Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Answer: How do I print only some letters of this string

( #304255=categorized answer: print w/ replies, xml ) Need Help??

Q&A > input and output > How do I print only some letters of this string contributed by Roy Johnson

nuance made a couple of sub-optimal choices: for instead of while, and the 4-argument substr to actually change $_ rather than the 3-argument form to get what he wants out of it.
while (<DATA>) { print substr($_, 0, 100); }

Comment on Answer: How do I print only some letters of this string
Download Code
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (13)
As of 2014-09-19 18:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (144 votes), past polls