Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
This is an attempted test of prelim. concepts or so I thought. Could you please advise me as to where or how I am going wrong.#!/usr/bin/perl -w use strict; my $month; my $value; $month=2; $value=300; my (@stat1,@stat2,@stat3,@stat4,@stat5,@stat6,@stat7,@stat8,@stat9,@st +at10,@stat11,@stat12); my $arrayname = 'stat'.$month; push @$arrayname, $value; my $nr=@stat2; print "NR $nr\n"; print "$stat2[0]\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Constructing Variable Arrayname
by Corion (Patriarch) on Dec 20, 2004 at 19:02 UTC | |
|
Re: Constructing Variable Arrayname
by Fletch (Bishop) on Dec 20, 2004 at 19:01 UTC | |
|
Re: Constructing Variable Arrayname
by Eimi Metamorphoumai (Deacon) on Dec 20, 2004 at 19:03 UTC | |
|
Re: Constructing Variable Arrayname
by dave_the_m (Monsignor) on Dec 20, 2004 at 19:08 UTC |