in reply to Split/Parameter Problem
Depending on your OS, you may not have "\n" in your data at all: it might be "\r\f" (CR-LF) instead (or, rarely, something else). Try:
Also, my ($test) = @ARGV will put only the first element of @ARGV (that is, $ARGV[0]) in $test. Is that what you wanted?my @foo = split "\n|\r\f", $test;
To help debug what you've got, try this:
If you still can't figure out what's wrong, paste the output from that, so maybe one of us will see something you're missing.$test =~ s/\n/**/g; ## replace all \n with '**' $test =~ s/\r/!!/g; ## replace all \r with '!!' print STDERR qq/'$test'/;
Anima Legato
.oO all things connect through the motion of the mind
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Split/Parameter Problem
by sgifford (Prior) on Jan 06, 2005 at 19:38 UTC |