Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

On exploring Perl

by jynx (Priest)
on Sep 25, 2001 at 05:32 UTC ( #114457=note: print w/replies, xml ) Need Help??

in reply to Another 'ode to backslash' ;-)


As others, i will commend your attempting to explore the perl language and learn it better. However, Learning perl through obfuscations is not a very good way to learn perl. This is in particular due to strict and warnings.

When first learning perl it might seem easier to ignore warnings and strict, when in fact this is false laziness. The path to true laziness would learn strict and warnings now so that they are easier to incorporate with knowledge later. With that in mind, if we were to rewrite your node with strict and warnings, we would only need to change code in two places*:

# change @a on first line to: my @a = ("... # change the for loop at the end so that $a is declared: foreach my $a (@a) {print chr(length $a)} # or change the for loop to use $_ instead of $a :) foreach (@a) {print chr length}
A better way to learn (AFAIK) would be to pick up the Llama book and read the chapters followed by doing the examples. To end with, here are some good nodes on learning perl:


* not counting the shebang line and the use strict; lines.

Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2023-12-07 13:02 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (32 votes). Check out past polls.