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

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' ;-)


Asmo,

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:

jynx


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


Comment on On exploring Perl
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2014-07-24 06:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (158 votes), past polls