Last night I was doing some karaoke stuff and I now have 3 Perl scripts that were helping me all the time:
#!/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