Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

why this scaler error?

by basicdez (Pilgrim)
on Nov 14, 2001 at 20:11 UTC ( [id://125341]=perlquestion: print w/replies, xml ) Need Help??

basicdez has asked for the wisdom of the Perl Monks concerning the following question:

Can't modify not in scalar assignment at ExampleConCat.pl line 3, near + ""foo000";"
This is the code that is generating this error, please help me if you can.
!#/usr/bin/perl-e $x = "foo000"; $x++; print $x, "\n";
peace, LOVE and ((code)) basicdez

Replies are listed 'Best First'.
Re: why this scaler error?
by japhy (Canon) on Nov 14, 2001 at 20:13 UTC
    You have "!#". It should be "#!".

    _____________________________________________________
    Jeff[japhy]Pinyan: Perl, regex, and perl hacker.
    s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;

Re: why this scaler error?
by Rich36 (Chaplain) on Nov 14, 2001 at 20:47 UTC
    Also, are you sure you meant "-e" on the "#!" line? I don't think that works.
    Rich36
    There's more than one way to screw it up...

Re: why this scaler error?
by basicdez (Pilgrim) on Nov 14, 2001 at 20:53 UTC
    Thanks for all the help on this piece. I promise to continue to learn as I go. peace, LOVE and ((code)) basicdez

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-25 23:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found