catfish1116 has asked for the wisdom of the Perl Monks concerning the following question:
Working on small program that displays hash slice, Below is code and error.
## Program executes example of hash slice my @players = qw/ barney fred dino/; my @bowling_scores = (195, 205, 30); my @score { @players} = @bowling_scores; print "Tonight's players were @players\n"; print "Their scores were: @score{@players}"; syntax error at ./Page_280 line 11, near "@score { " Execution of ./Page_280 aborted due to compilation errors
TIA The Catfish
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Working on hash slice
by hippo (Archbishop) on Mar 12, 2019 at 18:34 UTC | |
Re: Working on hash slice
by NetWallah (Canon) on Mar 12, 2019 at 18:48 UTC | |
Re: Working on hash slice
by AnomalousMonk (Archbishop) on Mar 12, 2019 at 23:34 UTC | |
Re: Working on hash slice
by kcott (Archbishop) on Mar 13, 2019 at 07:44 UTC | |
Re: Working on hash slice
by choroba (Cardinal) on Mar 14, 2019 at 00:22 UTC |