Hello,
I would like to know if it is possible to do somthing like this:
( I know I can't do it this way as Perl barfs when I tried it )
$SizeOfMyArray = 2;
$MyArray[ $SizeOfMyArray ];
push( @MyArray[ 0 ], 0 ); << --- complains here with < ERROR > (see
below )
push( @MyArray[ 1 ], 5 );
foreach $item ( @MyArray )
{
print " Number $item \n";
}
< ERROR >
Type of arg 1 to push must be array (not array slice) at c:\my.pl line 122,
near "0 )"
syntax error at c:\my.pl line 125, near "$item ("
(Might be a runaway multi-line << string starting on line 122)
Execution of c:\my.pl aborted due to compilation errors
Thanks
Mike