Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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

Replies are listed 'Best First'.
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?
[stevieb]: I think that placing the * in C when dealing with pointers is akin to keeping separated the circumfix op from the inner ref in Perl: @{ $aref };, which is all personal preference. In perl, I'm good. C, don't know what I like
[stevieb]: ...yet. Still too newbie

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2017-01-24 02:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (200 votes). Check out past polls.