Title: Message
>> It is returning: 
 > >Results of the split is: Date: ID: Owner: Name:4  
>These results look like they're coming from your variable names, somehow.  Or $Activity_Detail_Line isn't what you think it is.\
 
Actually, looking at your results, it's more likely you have a statement like:
 
print "Date: $Activity_Date ID: $Activity_ID Owner: $Activity_Owner Name: $Activity_Name\n";
 
and the $Activity_Name variable is the only one filled, with the number of tokens from the split.
 
 
 

Sam Gardner

GTO Application Development

Keefe, Bruyette & Woods, Inc.

212-887-6753



-----Original Message-----
From: Gardner, Sam
Sent: Wednesday, August 31, 2005 4:59 PM
To: '[EMAIL PROTECTED]'; $Bill Luebkert
Cc: [email protected]
Subject: RE: Metacharacters


 > I need to put each string prior to a space into a seperate variable.  Here is my string: 

 > 05-Dec-01.10:00:50  activity011204.221111  CLUNGU   "(31246)" 

 > Here is my command to dump the variables: 
 > $Activity_Date,$Activity_ID,$Activity_Owner,$Activity_Name = split (/\s+/,$Activity_Detail_Line);  
 
remember, your split is returning an array, so you need the parentheses around the grouped scalar variables.  
($Activity_Date,$Activity_ID,$Activity_Owner,$Activity_Name) = split (/\s+/,$Activity_Detail_Line); 
 


 > It is returning: 
 > Results of the split is: Date: ID: Owner: Name:4  
These results look like they're coming from your variable names, somehow.  Or $Activity_Detail_Line isn't what you think it is.\
 
Good luck,
 
Sam
 
 


_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to