in reply to Re^2: passing arrays
in thread passing arrays
Actually all three arguments to split [pattern;[, expression, limit]] are optional.
I find that statement misleading. See the 'template' at the top of spilt:
split /PATTERN/,EXPR,LIMIT split /PATTERN/,EXPR split /PATTERN/ split
This implicitly (and rightly) excludes:
split EXPRWhich is exactly what the OP tries to do in the line:
@mails = split ('$line');This is why the OP's code generates the following error:
Use of uninitialized value $_ in split at XX.pl line YY.IOW, the 'expression' argument is optional only if the 'pattern' argument is present.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: passing arrays
by Fletch (Bishop) on Apr 20, 2008 at 04:07 UTC |