Re: @array =to=> $array

2005-06-09 Thread John W. Krahn
[EMAIL PROTECTED] wrote: Hi All Hello, Prob: I want to convert all the elememts of an array to ascalor variable that I can use latter on in my code Each element of an array *is* a scalar so why do you think you need to do this? e.g. my @array=qw/balli johney bobby/; now here i need 3 d

Re: @array =to=> $array

2005-06-09 Thread Lawrence Statton
> Hi All > > Prob: I want to convert all the elememts of an array to ascalor variable that > I can use latter on in my code > e.g. > > my @array=qw/balli johney bobby/; > now here i need 3 different variable with the above values i.e. > my $name1=balli ; > my $name2=johney ; > my $name3=bo

Re: @array =to=> $array

2005-06-09 Thread John W. Krahn
[EMAIL PROTECTED] wrote: Each element of an array *is* a scalar so why do you think you need to do this? my ( $name1, $name2, $name3 ) = @array; True, But how would I know how many ($name) to use in the line above In my case for a perticular user I have some bad volumes which are @array

Re: @array =to=> $array

2005-06-09 Thread Pablo Wolter
[EMAIL PROTECTED] wrote: > Hi All > >Prob: I want to convert all the elememts of an array to ascalor variable that >I can use latter on in my code >e.g. > >my @array=qw/balli johney bobby/; >now here i need 3 different variable with the above values i.e. >my $name1=balli ; >my $name2=johney ;

Re: @array =to=> $array

2005-06-09 Thread Wiggins d'Anconia
Pablo Wolter wrote: > [EMAIL PROTECTED] wrote: > > >>Hi All >> >>Prob: I want to convert all the elememts of an array to ascalor variable that >>I can use latter on in my code >>e.g. >> >>my @array=qw/balli johney bobby/; >>now here i need 3 different variable with the above values i.e. >>my

Re: @array =to=> $array

2005-06-09 Thread Lawrence Statton
> [EMAIL PROTECTED] wrote: > > > Hi All > > > >Prob: I want to convert all the elememts of an array to ascalor variable tha > t I can use latter on in my code > >e.g. > > > >my @array=qw/balli johney bobby/; > >now here i need 3 different variable with the above values i.e. > >my $name1=balli ;

Re: @array =to=> $array

2005-06-10 Thread Dave Gray
> my $localtime; > @$localtime{qw / second minute hour mday month year weekday yearday isdst /} = > localtime(time); > > [1] A style nit: Speaking of nitpicks: my %localtime; > If you DO need to iterate across all the indices for an array ( rarely > necessary if you have designed your data corre

Re: @array =to=> $array

2005-06-10 Thread Lawrence Statton
> > my $localtime; > > @$localtime{qw / second minute hour mday month year weekday yearday isdst / > } = > > localtime(time); > > > > [1] A style nit: > > Speaking of nitpicks: > my %localtime; Assuming you are suggesting making that change, I'd reccomend against it, unless you wish to elicit th

Re: @array =to=> $array

2005-06-10 Thread Dave Gray
On 6/10/05, Lawrence Statton <[EMAIL PROTECTED]> wrote: > > > my $localtime; > > > @$localtime{qw / second minute hour mday month year weekday yearday isdst > > > / > > } = > > > localtime(time); > > > > > > [1] A style nit: > > > > Speaking of nitpicks: > > my %localtime; > > Assuming you are su

Re: @array =to=> $array

2005-06-10 Thread Lawrence Statton
> Huh. So it does... that doesn't look like it's making a reference, > though. I think I would write that as @{$localtime}{ ... } for > clarity. > I only got out my "snippy" voice because it will be a snowy day here when I post example code to the list that hasn't actually been tested. It does no

Re: @array =to=> $array

2005-06-10 Thread Dave Gray
On 6/10/05, Lawrence Statton <[EMAIL PROTECTED]> wrote: > > Huh. So it does... that doesn't look like it's making a reference, > > though. I think I would write that as @{$localtime}{ ... } for > > clarity. > > As to the clarity question. To my eyes, I find spurious {} tend to > diminish rather t