Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Storing Lines before and After pattern

by Zaxo (Archbishop)
on Jan 27, 2004 at 01:05 UTC ( #324326=note: print w/replies, xml ) Need Help??


in reply to Storing Lines before and After pattern

This will break on every occurance of DOG, my @parts = split /DOG/, $poem;

This will break on the first occurance, my ($before, $after) = split /DOG/, $poem, 2; You can also do things with regexes or substr, rindex, and index

After Compline,
Zaxo

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://324326]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2021-09-24 15:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?