[ale] [OT] Perl Question

Jonathan Glass jonathan.glass at ibb.gatech.edu
Thu Jul 3 15:49:48 EDT 2003


I have yet to find that command in the two Perl books I'm reading.

Thanks!

Jonathan

On Thu, 2003-07-03 at 15:44, Geoffrey wrote:
> Jonathan Glass wrote:
> > If I have an array
> > $array[0]="2003-07-03 14:30:37 128.61.131.173 00:e0:29:84:a6:7e
> > BaoTweezers"
> > $array[1]="2003-07-03 14:30:37 128.61.131.94 00:e0:29:84:a6:7e
> > BaoTweezers"
> > 
> > How can I pull out parts of this string?  In other languages I'd use a
> > trim feature.  The real trick is , the date and time stamp need to be
> > one variable.  Then IP, MAC and Name need to be different variables. 
> > Any direction is greatly appreciated.
> 
> ($date, $time, $ip, $mac, $name) = split /\s/, $array[0];
> 
> $date_time = $date . " " . $time;
> 
> > 
> > Thanks
> > 
-- 
Jonathan Glass <jonathan.glass at ibb.gatech.edu>

_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale





More information about the Ale mailing list