Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Removing delimiters

by Aristotle (Chancellor)
on Feb 06, 2003 at 12:04 UTC ( #233114=note: print w/replies, xml ) Need Help??


in reply to Removing delimiters

I'm not sure why everyone wants to use split when you really just want one of the parts.
$_ = "foo::bar"; my ($head) = /^.*?::/; my ($tail) = /::.*/;
That said, if you need them both of them at various times, you should probably split on :: to an array when you read the file and then pass a reference to that around.

Makeshifts last the longest.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2022-12-07 02:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?