in reply to RE: My first JAPH (a project to learn more perl)
in thread My first JAPH (a project to learn more perl)

Wouldn't the pound sign (#) in the second line make the rest of that line a remark?
  • Comment on RE: RE: My first JAPH (a project to learn more perl)

Replies are listed 'Best First'.
(ar0n: $# returns last el. in array) RE (3): My first JAPH (...)
by ar0n (Priest) on Sep 28, 2000 at 16:42 UTC
    No.

    $# returns the subscript of the last element in an array. So if you'd have an array called @array with six elements, $#array would return 5:
    qw(one two three four five six); print $array[$#array]; # prints "six"
    $j[$#j+1] = ("another");
    is actually just obfuscation for this:
    push @j, "another";

    [~]