LostS has asked for the wisdom of the Perl Monks concerning the following question:
Thank you all loads for any help...foreach my $line (@rows) { $line =~ s/\t/\x09/ig; $line =~ s/\n/\x0A/ig; $line =~ s/\r/\x0D/ig; $line =~ s/"/'/ig; print FILE "\"$line\","; $cell++; }
perl -le '$cat = "cat"; if ($cat =~ /\143\x61\x74/) { print "Its a cat +!\n"; } else { print "Thats a dog\n"; }'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Pattern Match/Trim Variables.
by fruiture (Curate) on Feb 17, 2003 at 19:10 UTC | |
by LostS (Friar) on Feb 17, 2003 at 19:34 UTC | |
|
Re: Pattern Match/Trim Variables.
by dvergin (Monsignor) on Feb 17, 2003 at 20:01 UTC | |
|
Re: Pattern Match/Trim Variables.
by enoch (Chaplain) on Feb 17, 2003 at 20:10 UTC | |
|
Re: Pattern Match/Trim Variables.
by ihb (Deacon) on Feb 17, 2003 at 23:38 UTC | |
|
Re: Pattern Match/Trim Variables.
by steves (Curate) on Feb 17, 2003 at 22:09 UTC | |
|
Re: Pattern Match/Trim Variables.
by steves (Curate) on Feb 17, 2003 at 19:12 UTC | |
by LostS (Friar) on Feb 17, 2003 at 19:21 UTC | |
by Coruscate (Sexton) on Feb 17, 2003 at 20:44 UTC | |
by steves (Curate) on Feb 17, 2003 at 22:18 UTC |