The code you posted does not compile:#!/usr/bin/perl -w use strict; my @array=qw (5 4 10); for(my $i=0;$i<$#array;$i++){ my $first=$ar_no[$i];
You can use diagnostics to get a more verbose explanation. You declared an array name "array", but you did not declare an array named "ar_no". Try changing ar_no to array.Global symbol "@ar_no" requires explicit package name at
In reply to Re: Printing the elements of array
by toolic
in thread Printing the elements of array
by viktor
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |