Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Hey guys, It's been a little while since I've been back to the gates, because I have decided to have a "fresh start" with the Llama. This after a pusillanimous start in my path to true perl wisdom.

Now, I know that some folks out there aren't happy that I haven't yet learned the use of 'strict'. To whit I say "PATIENCE my brethren!" ;P. For I realize that I've only ridden tricycles my whole life. Now I've taken it upon myself to learn how to drive a fricken' Batmobile and I'm only up to 3rd gear...out of 27 or so! It'll be some time before I get to ejector seats n' oilslicks! As soon as doc merlyn 'splain to me 'bout strict in da book, I promise to you I will start using it! :D

At any rate, I've been cruisin' right along through the examples up to this point! But I have inadvertantly rammed the Bat'bile into a wall at the moment. For the past two hours I've been frying my brain with variations on Chapter 3 example 2.
#!/usr/bin/perl -w @names = qw/fred barney wilma betty/; @in; $count = 0; print "\n\n\n"; # just some dumb formatting while ($in[$count] !~ /q/i) { print "\nPlease enter a number: "; chomp($in[$count]); count++; } foreach $x (@in) { print $names[$x]; print "\n"; } print "\n\n\ndone.\n\n\n"; # just more formatting and so I know it's + "done"


The error I get (consistantly) is

Use of unitialized value in pattern match (m//) at ./chp3-ex2.pl in line 11, <STDIN> line 2.

I swear to you that I've been tinkering with this for HOURS!!!! I suppose, no I know I've learned some stuff from the tinkering! That's what I've been doing with EVERY example from the book. Tinkering, experimenting, playing. I've pretty much been ignoring the "time suggestions". Usually I'm way under even those suggestions! But for now, I sit here...befuddled. I think I am going to have a little break and go take in some bad sci-fi!

By the way, for those of you who gave me SAGE advice on my last go round through Perl 21 (which I abandoned halfway through)...your words are *NOT* lost on me! EVERY POST has been read, re-read and will be re-read AGAIN after I have a better grasp of the llama!

In reply to Befuddled by The Llama by bluethundr

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2024-04-16 19:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found