AW: how to initialise a two dimensional array

2002-09-18 Thread Angerstein

just:

$hereiam[0][0] = "Things";
$hereiam[0][1] = " Eye ";
$hereiam[0][2] = "always";
$hereiam[0][3] = "wanted ";
$hereiam[1][0] = "blahhh";
$hereiam[1][1] = "blahh";
$hereiam[1][2]= "blah";



> -Ursprüngliche Nachricht-
> Von: Nikola Janceski [mailto:[EMAIL PROTECTED]]
> Gesendet am: Mittwoch, 18. September 2002 16:00
> An: 'pravesh biyaNI'; [EMAIL PROTECTED]
> Betreff: RE: how to initialise a two dimensional array
>
> you only need to declare with my() the first array. all the other
> arrays are
> just references to anonymous arrays (if you create the 2-d array like most
> people do).
>
> ex:
>
> my(@arr);
>
> $arr[0] = [ qw( 1 2 3 4 5 ) ];
>
>
> > -Original Message-
> > From: pravesh biyaNI [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, September 18, 2002 9:56 AM
> > To: [EMAIL PROTECTED]
> > Subject: how to initialise a two dimensional array
> >
> >
> > Hi
> >   I am using a two dimentional array!! but the script on
> > running gives
> > an error
> >
> > global symbol requires explicit package name.
> >
> > how to use my () with a two dimentional array
> >
> > help awaited
> > pravesh
> >
> >
> > --
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> --
> --
> 
> The views and opinions expressed in this email message are the sender's
> own, and do not necessarily represent the views and opinions of Summit
> Systems Inc.
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: how to initialise a two dimensional array

2002-09-18 Thread Chas Owens

On Wed, 2002-09-18 at 09:56, pravesh biyaNI wrote:
> Hi
>   I am using a two dimentional array!! but the script on running gives 
> an error
> 
> global symbol requires explicit package name.
> 
> how to use my () with a two dimentional array
> 
> help awaited
> pravesh

First you must recognize that there is no such thing as a
multidimensional array.  It is really an array that holds arrayrefs as
values.  When you successfully wrap your head around that concept you
will see that there is no difference between "normal" arrays and
multidimensional arrays.  


#!/usr/bin/perl

use strict;

my @LoL = (
[ 1, 0, 0 ],
[ 0, 0, 1 ]
);

for my $x (0..$#LoL) {
for my $y (0..$#{$LoL[$x]}) {
print "$LoL[$x][$y] ";
}
print "\n";
}



 
-- 
Today is Sweetmorn the 42nd day of Bureaucracy in the YOLD 3168
Grudnuk demand sustenance!

Missile Address: 33:48:3.521N  84:23:34.786W


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: how to initialise a two dimensional array

2002-09-18 Thread Nikola Janceski

you only need to declare with my() the first array. all the other arrays are
just references to anonymous arrays (if you create the 2-d array like most
people do).

ex:

my(@arr);

$arr[0] = [ qw( 1 2 3 4 5 ) ];


> -Original Message-
> From: pravesh biyaNI [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 18, 2002 9:56 AM
> To: [EMAIL PROTECTED]
> Subject: how to initialise a two dimensional array
> 
> 
> Hi
>   I am using a two dimentional array!! but the script on 
> running gives 
> an error
> 
> global symbol requires explicit package name.
> 
> how to use my () with a two dimentional array
> 
> help awaited
> pravesh
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 



The views and opinions expressed in this email message are the sender's
own, and do not necessarily represent the views and opinions of Summit
Systems Inc.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: how to initialise a two dimensional array

2002-09-18 Thread NYIMI Jose (BMB)



> -Original Message-
> From: pravesh biyaNI [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, September 18, 2002 3:56 PM
> To: [EMAIL PROTECTED]
> Subject: how to initialise a two dimensional array
> 
> 
> Hi
>   I am using a two dimentional array!! but the script on 
> running gives 
> an error
> 
> global symbol requires explicit package name.

Send a piece of code, please ...

José.


 DISCLAIMER 

"This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer".

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




how to initialise a two dimensional array

2002-09-18 Thread pravesh biyaNI

Hi
  I am using a two dimentional array!! but the script on running gives 
an error

global symbol requires explicit package name.

how to use my () with a two dimentional array

help awaited
pravesh


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]