in reply to Assigning text sections to scalars
#!/usr/bin/perl my $txt = "Company Says It Can Derive Stem Cells From the Placenta By NICHOLAS WADE A New Jersey company said that it had developed a method to extract a +novel kind of stem cell from the placenta. "; if( $txt =~ /^(.*?)\n\r?\n(.*?)\n\r?\n(.+)$/s ){ print "[$1] [$2] [$3]\n"; }
|
|---|