jeniffer wrote:
I have a file of the format
action arg1 \
arg2 \
arg3 \
action2 arg1 \
arg2 \
arg3 \
I read this by :-
foreach $line (@lines)
{
($action , @argument_list) = split(/\s+/,$line);
This would work fine if the file is of the
format
action arg1 arg2 arg3
not my original file...
Please help me!
Hi Jenniffer.
(Nice email address :)
I hope the short program below helps.
Rob
use strict;
use warnings;
while (<DATA>) {
chomp;
while (s|\\$||) {
$_ .= <DATA>;
chomp;
}
print "$_\n";
}
__DATA__
action arg1 \
arg2 \
arg3 \
action2 arg1 \
arg2 \
arg3 \
**OUTPUT**
action arg1 arg2 arg3
action2 arg1 arg2 arg3
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/