Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

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

by Roy Johnson (Monsignor)
on Nov 03, 2003 at 21:53 UTC ( #304255=categorized answer: print w/replies, xml ) Need Help??

Q&A > input and output > How do I print only some letters of this string - Answer 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); }

Log In?

What's my password?
Create A New User
[karlgoethebier]: My perltidy adds a semicolon after .... How can i avoid this?
[LanX]: ellipse aka ... aka yadda yadda is a new command
[LanX]: sopw!

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2017-11-18 18:14 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (277 votes). Check out past polls.