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);
}
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|