You'll need to declare $cue_file_found, and you'll also need
to use strictures. I ran this and got no errors:
#!/usr/bin/perl
use strict;
use autodie;
use warnings;
sub exractSongTitlesFromCueFile {
my ( $cue_file_to_parse ) = @_;
my @album_info;
my $w = 0;
my $cue_file_found = '/tmp/cue/cue_file';
open( CUEFILEFOUND, '<', $cue_file_found )
or die "Could not open cue file named:
$cue_file_found! $!\n";
while (<CUEFILEFOUND>) {
if ( $_ =~ /\s+TITLE "(.*)".*/ ) {
$album_info[$w] = $1
|| die "Error 004:
Couldn't assign song title to array! $!\n";
$w++ || die "Error 005:
Could not increment array pointer $!\n";
}
}
close(CUEFILEFOUND);
return (@album_info);
}