in reply to Placing text onto multiple lines
This works for me:
_____________________
"We've all heard that a million monkeys banging on a million typewriters will eventually reproduce
the entire works of Shakespeare. Now, thanks to the Internet, we know this is not true."
And output:use strict; while (<DATA>) { chomp(); my ($first, @rest) = split "<job>"; print "$first<job>$_\n" for @rest; } __DATA__ John Smith 25 May 2003 <job>Manager Clean-up John Smith 25 May 2003 <job>Manager Clean-up <job>Manager Books John Smith 25 May 2003 <job>Manager Clean-up <job>Manager Books <job>M +anager Acounts
John Smith 25 May 2003 <job>Manager Clean-up John Smith 25 May 2003 <job>Manager Clean-up John Smith 25 May 2003 <job>Manager Books John Smith 25 May 2003 <job>Manager Clean-up John Smith 25 May 2003 <job>Manager Books John Smith 25 May 2003 <job>Manager Acounts
_____________________
"We've all heard that a million monkeys banging on a million typewriters will eventually reproduce
the entire works of Shakespeare. Now, thanks to the Internet, we know this is not true."
Robert Wilensky, University of California
|
---|
In Section
Seekers of Perl Wisdom