Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
The stupid question is the question not asked
 
PerlMonks  

Lady_Aleena's scratchpad

by Lady_Aleena (Chaplain)
on Sep 07, 2007 at 20:54 UTC ( #637756=scratchpad: print w/ replies, xml ) Need Help??

Notes to self

  • If one changes a variable, check the whole script for that variable to make sure that the results will be as expected.
  • From bart: LA it's often considered good practice to increment the variable in a continue block, to prevent running out of sync when using next.
  • Do not print Dumper when trying to display a script in a browser without using <pre> tags.
  • Do print Dumper when something goes wrong. The data structure is usually the problem.
  • Intrepid: btw, i wish i could explain to a lot of people i know, how efficacious Lady_Aleena's explained strategy can be (to use coding and thinking about coding to master a disquieted state of mind)
  • From ambrus: In general, use magic only when normal solutions aren't enough.
  • From GrandFather: each time through its loop while asks itself "Can I loop this time? Can I? Can I Can I? Please?" and if the answer is no (false statement) while gets grumpy and stops
  • rename will not create directories, be sure to use mkdir in conjunction with rename if the files are also being moved to a new directory.

Things I should get a grip on

  • objects
  • testing
  • SQL
  • version control

Current code

use strict; use warnings;

Silly (and incomplete) code

use strict; use warnings; my @courses = qw(salad fish entree oyster dessert); if (@courses > 3) { my @last = splice(@courses,3,-1); my @forks = map { "$_ fork" } @courses; my @knives = map { "$_ knife" } reverse @courses; my $last = grep { /oyster/ } @last ? 'oyster fork' : ''; print 'napkin '.join(' ',@forks).' plate '.join(' ',@knives).' spoon + '.$last; }
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (8)
As of 2013-05-23 05:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best material for plates (tableware) is:









    Results (473 votes), past polls