Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Split words

by Utilitarian (Vicar)
on Jul 11, 2012 at 14:57 UTC ( #981143=note: print w/replies, xml ) Need Help??


in reply to Split words

perl -e ' while(<>){@monk_split=split(/\s*(monks)\s*/);print join"\n", +@monk_split}' ~/tmp/tmp.dat perl monks wisdom monks perl wisdom
print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."