in reply to Re^2: How do I select first string of a two dimensional array to compare to other values?
in thread How do I select first string of a two dimensional array to compare to other values?
So how does your current code fail to serve your purposes? An alternative:
c:\@Work\Perl\monks>perl -wMstrict -le "my $line = qq{1424621700, 2015-02-22 16:15:00, 4294.700\n}; chomp $line; print qq{'$line'}; ;; my ($first) = split m{ , \s* }xms, $line; print qq{'$first'}; " '1424621700, 2015-02-22 16:15:00, 4294.700' '1424621700'
Update: Ah, I see it now:
my $first_line = $splits;
and again, how can this compile with strict enabled? You probably want something like the
my $first_line = $splits[0];
statement you had before.
Give a man a fish: <%-{-{-{-<
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: How do I select first string of a two dimensional array to compare to other values?
by joi1369 (Initiate) on Aug 31, 2015 at 01:19 UTC | |
by AnomalousMonk (Archbishop) on Aug 31, 2015 at 01:49 UTC | |
by AnomalousMonk (Archbishop) on Aug 31, 2015 at 01:30 UTC |