Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Yet Another Perl Aptitude Test (yapat)

by tame1 (Pilgrim)
on Feb 28, 2001 at 20:59 UTC ( [id://61349]=note: print w/replies, xml ) Need Help??


in reply to Yet Another Perl Aptitude Test (yapat)

My perl is barfing over "use warnings".

Where can I get that module?

What does this little button do . .<Click>; "USER HAS SIGNED OFF FOR THE DAY"

Replies are listed 'Best First'.
Re: Re: Yet Another Perl Aptitude Test (yapat)
by davorg (Chancellor) on Feb 28, 2001 at 21:01 UTC

    The warnings pragma is new in Perl 5.6. Under earlier versions you can get much the same effect using the -w command line option.

    --
    <http://www.dave.org.uk>

    "Perl makes the fun jobs fun
    and the boring jobs bearable" - me

      Running in Perl 5.005, the darn thing always tells me I am wrong, even when I am not!

      Kind of disheartening! (The use warnings is now commented out)

      What does this little button do . .<Click>; "USER HAS SIGNED OFF FOR THE DAY"

        "Even when I am not" ... could you please explain?

        use warnings / -w spits out what it spits out for a reason. What is it telling you you're doing wrong, and why is what you're doing not wrong?

        yes, this is a genuine question.

        Philosophy can be made out of anything. Or less -- Jerry A. Fodor

Re: Re: Yet Another Perl Aptitude Test (yapat)
by zeno (Friar) on Feb 28, 2001 at 22:14 UTC
    Sorry, I've taken the "use warnings" line out. It's not a module, it's a pragma, and it only works in 5.6. Anyway, it wasn't really necessary, (as davorg says here), since I started out with #!/usr/bin/perl -w. Duh, I guess I just put it there in autopilot. Hope it works for you now!
      I am coming across the problem now that when I answer a question,
      the program tells me I am wrong, no matter what I say.
      If I then use the ? to see the "right" answer, it's the same thing I answered!

      What does this little button do . .<Click>; "USER HAS SIGNED OFF FOR THE DAY"

        Hi tame1! I'm sorry this is happening. It is possible that you are having a problem because my Windoze machine has put different line feed characters in the program than your machine wants to use. I found that when I carried this over to my linux box, I had to run this one-liner to get it to work:

        perl -p -ibak -e 's/\015//g' yapat.pl

        This removed any funky characters which made the regex fail. Again, I'm really sorry that happened-- tell me if this fixes the problem (and if it doesn't, please tell me too!) Thanks. -zeno

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-03-29 08:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found