Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: using split without $junk

by Limbic~Region (Chancellor)
on Nov 24, 2003 at 18:28 UTC ( [id://309615]=note: print w/replies, xml ) Need Help??


in reply to using split without $junk

Anonymous Monk,

This was discussed recently, but here is one way that doesn't involve split at all.

#!/usr/bin/perl -w use strict; my $string = 'part of string to keep|part of string to toss'; my $keep = substr($string , 0 , index($string , '|'));
Cheers - L~R

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (7)
As of 2024-04-23 11:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found