in reply to Comment not matching code in Programming Perl
Now that is a pointless shell script, but it illustrates the use of the \ at the end of a line that I think might be what the example in the book is refering to.find ./ --name igloo.txt | \ xargs ls -l $1 | \ grep 'Dec'
it would "do the right thing", which is get the next line of the file and append it to the previous lines before it enters the # now process $_ block if the pattern match is a success.Hello Cold Cruel \ World. Are you ready to take a trip to \ the mall with me for some very delicious ice cream? I think this will make for a delightful day, \ don't you?
while (<DATA>) { chomp; if (s/\\//) { $_ .= <DATA>; redo unless eof; # don't read past each file's eof } # now proces $_ print $_ . "\n"; } __DATA__ Hello Cold Cruel \ World. Are you ready to take a trip to \ the mall with me for some very delicious ice cream? I think this will make for a delightful day, \ don't you?
|
|---|