C
C Marshall
I haven't had any luck managing to autosplit on the semi colon
character under AIX when putting my commandline options into a script.
i.e. whilst
echo "1;2;3"| perl -anl -F\; -e 'print "$F[1]"'
2
works correctly I cannot reproduce the effects in a script
eg
echo "1;2;3"| test.pl
Use of uninitialized value in string at test.pl line 4, <> line 1 (#1)
(W uninitialized) An undefined value was used as if it were
already defined. It was
interpreted as a "" or a 0, but maybe it was a mistake. To
suppress this
warning assign a defined value to your variables.
where test.pl is:
#!/usr/bin/perl -awnl -F\;
use diagnostics;
print "$F[1]";
I've tried a variety of formats for the -F line e.g
"\;"
""\;""
"'\;'"
";"
\073
\x3A
/\073/
/\;/
etc. to no avail.
Any idea where I'm going wrong ?
perl, v5.6.0 built for aix
Thanks
Chris
character under AIX when putting my commandline options into a script.
i.e. whilst
echo "1;2;3"| perl -anl -F\; -e 'print "$F[1]"'
2
works correctly I cannot reproduce the effects in a script
eg
echo "1;2;3"| test.pl
Use of uninitialized value in string at test.pl line 4, <> line 1 (#1)
(W uninitialized) An undefined value was used as if it were
already defined. It was
interpreted as a "" or a 0, but maybe it was a mistake. To
suppress this
warning assign a defined value to your variables.
where test.pl is:
#!/usr/bin/perl -awnl -F\;
use diagnostics;
print "$F[1]";
I've tried a variety of formats for the -F line e.g
"\;"
""\;""
"'\;'"
";"
\073
\x3A
/\073/
/\;/
etc. to no avail.
Any idea where I'm going wrong ?
perl, v5.6.0 built for aix
Thanks
Chris