[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ale] [OT] Perl Question
- To: ale@ale.org
- Subject: Re: [ale] [OT] Perl Question
- From: Geoffrey <esoteric@3times25.net>
- Date: Thu, 03 Jul 2003 15:44:48 -0400
- In-Reply-To: <1057260802.25533.76.camel@ibb-250.ibb.gatech.edu>
- List-Archive: <http://www.ale.org/pipermail/ale/>
- List-Help: <mailto:ale-request@ale.org?subject=help>
- List-Id: Atlanta Linux Enthusiasts <ale.ale.org>
- List-Post: <mailto:ale@ale.org>
- List-Subscribe: <http://www.ale.org/mailman/listinfo/ale>,<mailto:ale-request@ale.org?subject=subscribe>
- List-Unsubscribe: <http://www.ale.org/mailman/listinfo/ale>,<mailto:ale-request@ale.org?subject=unsubscribe>
- References: <1057260802.25533.76.camel@ibb-250.ibb.gatech.edu>
- Reply-To: ale@ale.org
- Sender: ale-admin@ale.org
- User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130
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
>
--
Until later: Geoffrey esoteric@3times25.net
The latest, most widespread virus? Microsoft end user agreement.
Think about it...
_______________________________________________
Ale mailing list
Ale@ale.org
http://www.ale.org/mailman/listinfo/ale