hello monks. i have a problem with a subroutine of mine. i dont know if it something wrong with its syntax, and googling it, wasnt much of a help. so, i have this subroutine:
sub exractSongTitlesFromCueFile{
my ($cue_file_to_parse) = @_;
my @album_info;
my $w = 0;
open(CUEFILEFOUND, $cue_file_found) || die "Error 003: Could not o
+pen cue file named: $cue_file_found! $!\n";
while(<CUEFILEFOUND>){
if($_ =~ /\s+TITLE "(.*)".*/){
$album_info[$w] = $1 || die "Error 004: Could assign song
+title to array! $!\n";
# print "$1\n";
$w++ || die "Error 005: Could not increment array pointer
+$!\n";
}
}
close(CUEFILEFOUND);
return (@album_info);
}
</code
and running the script, would give me this output:
<code>
Error 005: Could not increment array pointer Inappropriate ioctl for d
+evice
i dont understand what i m doing wrong. i mean, i just want to increment my variable...
thanks for your time though, and sorry if my question is a tad stupid. i just dont understand the problem, and i cant search for it somewhere. so any help would be appreciated.