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.

In reply to weird begginer's problem... by Arien0611

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.