Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: How do I pull n characters off the front of a string?

by cbraga (Pilgrim)
on May 01, 2001 at 22:47 UTC ( [id://77068]=note: print w/replies, xml ) Need Help??


in reply to How do I pull n characters off the front of a string?

Or this way:
#assuming $n contains the number $string =~ s/^(.{$n})//; $first_n = $1;

Originally posted as a Categorized Answer.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-04-19 22:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found