Hello everyone
I would like to be able to print the songs'titles according to the author.
The format of the songs are as follow :
Freda Payne - In motion.mp3
Sylvester - Was it something that i said.mp3
George Benson & A. Franklin - Love All The Hurt Away.mp3
#!/usr/local/bin/perl -w
use strict;
use warnings;
my @author;
my @title;
my $song;
my $i;
my $j;
# @ARGV -> *.mp3
foreach $i (@ARGV) {
$i =~ s/ /_/g;
# print $i."\n";
@song = split (/-/, $i);
}
foreach $j (@song) {
if ($j =~ /^_.*.mp3$/) {
print $j."\n";
}
}
NB : I haven't used the array @author yet because I don't know how I
can get the author from the song with the split function.
Thanks for your help.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>