Re: scalars & lists

2003-11-30 Thread James Edward Gray II
On Nov 30, 2003, at 12:33 PM, B. Rothstein wrote: If I have a scalar variable that itslef is a list of names and numbers, for example $names = 'john 35, jack 18, albert 24, timmy 42'; is it possible, and if so how can it be done to separate the individual names and ages from the list in their

Re: scalars & lists

2003-11-30 Thread R. Joseph Newton
"B. Rothstein" wrote: > If I have a scalar variable that itslef is a list of names and numbers, for > example > > $names = 'john 35, jack 18, albert 24, timmy 42'; is it possible, and if > so how can it be done to separate the individual names and ages from the > list in their scalar form in orde

RE: scalars & lists

2003-11-30 Thread B. Rothstein
If I have a scalar variable that itslef is a list of names and numbers, for example > $names = 'john 35, jack 18, albert 24, timmy 42'; is it possible, and if so how can it be done to separate the individual names and ages from the list in their scalar form in order to create new lists sorted by n

Re: scalars & lists

2003-11-30 Thread James Edward Gray II
Keep your replies on the list and you won't have to wait for me to wake up again for an answer. ;) On Nov 30, 2003, at 4:33 AM, B. Rothstein wrote: thanks for the functions, but for some reason the sort does not seem to be coming out correctly, any idea why? By default, sort() works ASCIIbetic

Re: scalars & lists

2003-11-29 Thread James Edward Gray II
On Nov 30, 2003, at 1:45 AM, B. Rothstein wrote: If I have a scalar variable that itslef is a list of names, for example $names = 'john, jack, albert, timmy"; is it possible, and if so how can it be done to separate the individual names from the list in their scalar form in order to create a new

Re: Scalars and Strict

2003-06-05 Thread Rob Dixon
Jeff Westman wrote: > Hi Rob, > > --- Rob Dixon <[EMAIL PROTECTED]> wrote: > > Jeff Westman wrote: > > > --- George Schlossnagle <[EMAIL PROTECTED]> wrote: > > > > > > > > On Wednesday, June 4, 2003, at 02:40 PM, Wagner, David --- > > > > Senior Programmer Analyst --- WGO wrote: > > > > > > > > >

Re: Scalars and Strict

2003-06-05 Thread Jeff Westman
Hi Rob, --- Rob Dixon <[EMAIL PROTECTED]> wrote: > Jeff Westman wrote: > > --- George Schlossnagle <[EMAIL PROTECTED]> wrote: > > > > > > On Wednesday, June 4, 2003, at 02:40 PM, Wagner, David --- Senior > > > Programmer Analyst --- WGO wrote: > > > > > > > Jeff Westman wrote: > > > > > This may

Re: Scalars and Strict

2003-06-05 Thread Rob Dixon
Jeff Westman wrote: > --- George Schlossnagle <[EMAIL PROTECTED]> wrote: > > > > On Wednesday, June 4, 2003, at 02:40 PM, Wagner, David --- Senior > > Programmer Analyst --- WGO wrote: > > > > > Jeff Westman wrote: > > > > This may sound trivial, but I am trying to declare and assign > > > > multi

Re: Scalars and Strict

2003-06-05 Thread royce . wells
try my ($a,$b)=("apples","apples"); In the other example it was pulling values from an array of scalars. In your example you are only providing 1 scalar for 2 scalar variables to share. Royce "The right word may be effective, but no word was ever as effective as a rightly timed pause."

Re: Scalars and Strict

2003-06-05 Thread Jeff Westman
I like this solution! Cool Thanks George and David. JW --- George Schlossnagle <[EMAIL PROTECTED]> wrote: > > On Wednesday, June 4, 2003, at 02:40 PM, Wagner, David --- Senior > Programmer Analyst --- WGO wrote: > > > Jeff Westman wrote: > >> This may sound trivial, but I am trying to

Re: Scalars and Strict

2003-06-05 Thread Jeff Westman
yeah, that works, but I was trying to do it in one statement as a scalar assigment. Thanks JW --- Stuart White <[EMAIL PROTECTED]> wrote: > Would declaring all your variables with one my > suffice? then your first line before use strict; > should work. Like this: > > my ($a, $b); > $a = $b =

Re: Scalars and Strict

2003-06-05 Thread Stuart White
Would declaring all your variables with one my suffice? then your first line before use strict; should work. Like this: my ($a, $b); $a = $b = 'apple'; --- Jeff Westman <[EMAIL PROTECTED]> wrote: > This may sound trivial, but I am trying to declare > and assign multiple > scalars to the same v

Re: Scalars and Strict

2003-06-05 Thread George Schlossnagle
On Wednesday, June 4, 2003, at 02:40 PM, Wagner, David --- Senior Programmer Analyst --- WGO wrote: Jeff Westman wrote: This may sound trivial, but I am trying to declare and assign multiple scalars to the same variable in the same statement. This is what I have: #!/bin/perl -w $a = $b = "app

RE: Scalars and Strict

2003-06-05 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Jeff Westman wrote: > This may sound trivial, but I am trying to declare and assign multiple > scalars to the same variable in the same statement. This is what I > have: > > #!/bin/perl -w > $a = $b = "apple";# works > use strict; > my ($a = $b) = "apple"; # does not works do: my (

RE: Scalars

2002-01-25 Thread Ben LaRue
the seond char must be a letter and you can't have a . in a variable name -Original Message- From: Naveen Parmar [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 24, 2002 3:06 PM To: [EMAIL PROTECTED] Subject: Scalars Why are the following 2 invalid scalar assignments? B. $17april =

Re: Scalars

2002-01-25 Thread Jeff Bisbee
* Naveen Parmar ([EMAIL PROTECTED]) wrote: > Why are the following 2 invalid scalar assignments? > > B. $17april = $dayDay 2; > C. $april.17 = $dayDay 2; > > TIA, > - NP Looks like homework to me :) -- ___vvz __ (_, ` ) ( )Jeff Bisbee#!/usr/bin/perl -w `~~~) )/\ [EMAIL

Re: Scalars

2002-01-24 Thread Jeff 'japhy' Pinyan
On Jan 24, Naveen Parmar said: >Why are the following 2 invalid scalar assignments? > >B. $17april = $dayDay 2; >C. $april.17 = $dayDay 2; I'm not sure what it is you're trying to do here at all. $17april is an invalid variable name, because: a) if a variable name starts with digits, it must