Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

syntax error with map in list context

by LucaPette (Friar)
on Nov 20, 2005 at 12:03 UTC ( #510234=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    
    ...
    } 1 .. 10;
    
    print "$_ @{$data{$_}}\n" for ( keys %data );
    
  2. or download this
    syntax error at ./mytest line 9, near "} 1"
    Execution of ./mytest aborted due to compilation errors.
    
  3. or download this
    my %data=map {
        "Player number $_", [ map { 1 + int rand(10) } 1 .. 5 ] 
    } 1 .. 10;
    
  4. or download this
    my %data=map {
        "Player number " . $_, [ map { 1 + int rand(10) } 1 .. 5 ] 
    } 1 .. 10;
    
  5. or download this
    Player number6 6 7 3 2 7
    Player number2 3 2 6 7 8
    ...
    Player number3 8 6 9 5 6
    Player number5 9 3 5 6 6
    Player number8 10 3 8 8 1
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://510234]
Approved by ww
Front-paged by friedo
help
Chatterbox?
[holli]: i was just thinking of the bare content.
[LanX]: Plenty of "templates" realised with CGI-HTML-function
[LanX]: well if you want you can fetch all XML and translate it to another board markup
[moritz]: at this time, a migration could consist of only migrating the rendered HTML of nodes
[moritz]: to a forum software that supports raw HTML input for legacy threads, and uses sane markup for everything else
[holli]: yeah, then vroom will personally stab me in the back at night
[holli]: exactly, moritz
[moritz]: with a big table of redirects to support the old links
[LanX]: do it
[holli]: well if you put some cleverness into the migration you can auto convert most of the links as well

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2017-11-20 19:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (292 votes). Check out past polls.

    Notices?