Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: dsfddf

by d4vis (Chaplain)
on Sep 15, 2000 at 20:27 UTC ( [id://32688]=note: print w/replies, xml ) Need Help??


in reply to Reaped: dsfddf

I'm not sure exactly what you're trying to do, but try:
#!/usr/bin/perl -w use strict; my %lefthand= qw(dsfddf asdfsfda); print $lefthand {dsfddf};

Hope this helps. ;)

~novice d4vis
#!/usr/bin/fnord
Editied Version...Thanks Tye

Replies are listed 'Best First'.
RE: Re: dsfddf
by Anonymous Monk on Sep 15, 2000 at 22:44 UTC
    Um... Global symbol "%lefthand" requires explicit package name at - line 1.
RE: Re: dsfddf
by d4vis (Chaplain) on Sep 16, 2000 at 01:25 UTC
    Heh...well, it was just a joke but the reply got me to read the docs on use strict, which I (obviously) hadn't really used much. So is;
    #!/usr/bin/perl -w use strict; my %lefthand= qw(dsfddf asdfsfda); my $lefthand=(); print $lefthand {dsfddf};

    the proper usage?
    Thanks for the tip.

    ~novice d4vis
    #!/usr/bin/fnord

      You don't need the my $lefthand= (); line since you never use a scalar named "lefthand". $lefthand{dsfddf} accesses the hash. You use "$" because you are getting a scalar back, but it has nothing to do with the variable $lefthand.

              - tye (but my friends call me "Tye")

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-04-16 13:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found