Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Mysterious "syntax error"

by BrowserUk (Patriarch)
on Nov 30, 2004 at 15:41 UTC ( #411213=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perl -Mstrict -wle"my %x = map{ 'A' => $_ } 1 .. 10"
    syntax error at -e line 1, near "} 1"
    Execution of -e aborted due to compilation errors.
    
  2. or download this
    perl -Mstrict -wle"my %x = map{ $_ => $_ } 1 .. 10"
    
    perl -Mstrict -wle"my %x = map{ 'A' . $_ => $_ } 1 .. 10"
    
  3. or download this
    P:\test>perl -Mstrict -wle"my %x = map{ qq[A_$_] => $_ } 1 .. 10"
    syntax error at -e line 1, near "} 1"
    Execution of -e aborted due to compilation errors.
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2022-05-22 10:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (80 votes). Check out past polls.

    Notices?