Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: 2 basic questions

by tobyink (Abbot)
on Apr 29, 2013 at 13:55 UTC ( #1031210=note: print w/ replies, xml ) Need Help??


in reply to 2 basic questions

use v5.12; my $check = "a"; $check++ for 1..3; # three letters say $check; $check++ for 1..24; # another 24 letters, but there's only 26 in the +alphabet, say $check; # so what happens now we've run off the end? # hmmm... that's handy. # it takes us to the next part of your question... my $input = $check; my $output = substr($input, 1, 1); # skip one character, take one char +acter say $output;
package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name


Comment on Re: 2 basic questions
Download Code
Re^2: 2 basic questions
by Anonymous Monk on Apr 29, 2013 at 14:50 UTC
    Thx Toby

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2014-10-22 04:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (112 votes), past polls