Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: 2 basic questions

by toolic (Bishop)
on Apr 29, 2013 at 13:56 UTC ( #1031211=note: print w/ replies, xml ) Need Help??


in reply to 2 basic questions

For 1 you can use a for loop, for 2 you can use substr

use warnings; use strict; my $check = "a"; $check++ for 1..3; print $check; print "\n"; my $input= "ab"; print substr $input, -1, 1; print "\n"; __END__ d b


Comment on Re: 2 basic questions
Download Code
Re^2: 2 basic questions
by Anonymous Monk on Apr 29, 2013 at 14:54 UTC
    thx Monk...

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2015-07-04 04:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls