малко Perl 
17.03.2007Категория: Животът ми
Снощи се занимавах с разни караоке неща и останах с 3 Perl скрипта които ми помагаха постоянно:
#!/usr/bin/perl# execute: ls *.mp3|perl create_zip_file.pl to create .zip from a pair of .mp3 .cdgforeach (<STDIN>) {$was = $_;$was =~ s|MP3||gi;chomp($was);$string = "zip \"$was"."zip\" \"$was"."mp3\" \"$was"."cdg\"";print $string;system ($string);}- Свалете този код/download this code: create_zip_file.pl
#!/usr/bin/perl# nicecase - proper case on icky filenames with spacesforeach (<STDIN>) {$was = $_;$_ = join ' ', map {ucfirst(lc($_))} split /\s+/, $_;print $_."\n";}- Свалете този код/download this code: names.pl
#!/usr/bin/perl -w#Swap Song - Artist to Artist - Songforeach (<STDIN>){#print $_."\n";chomp();$was = $_;@asd = split /\-/,$was;$asd[0] =~ s/[0-9]{1,2}\s//g;print $asd[1]." - ".$asd[0]."\n";}- Свалете този код/download this code: swap_artist_song.pl
Вашият коментар
Georgi’s Blog is proudly powered by
WordPress
Постове (RSS)
and Коментари (RSS).

20 queries. 1,055 seconds.

