Barry,
: I am trying to truncate a string so that it is only 39 characters long.
: The application is a label printing routine, and the label is only long
: enough to print 39 characters.
Wrong tool. Look for "substr".
Joe
Joseph Discenza
Senior Analyst/Software Developer
1251 N. Eddy Stre
$txt =~ s/^(.{1,39}).*$/$1/;
or
$txt = substr($txt,0,39);
--T
-Original Message-
From: perl-win32-users-boun...@listserv.activestate.com
[mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of Barry
Brevik
Sent: Thursday, June 30, 2011 11:49 AM
To: perl-win32-users@li
Will of Thornhenge wrote:
> I'm doing some work with mail headers that involves converting
> timestamps to a standard format. The following regex works except for
> one pesky trailing close parens.
>
> Here's a sample of the data that causes problems:
>
> ==sample data
> Date: Fri, 1 Aug 1997
What are you trying to get the Epoch time from a date? If so you could also
use the Date::Calc modules Date_to_Time function.
Hope this helps.
Trevor Joerges
SendMIME Software
www.sendmime.com
- Original Message -
From: "Will of Thornhenge" <[EMAIL PROTECTED]>
To: "perl-win32-users Mail
Jaime Teng wrote:
>
> Hi,
>
> Below is a test script im working on:
>
> ##
> $input = '[EMAIL PROTECTED]';
> $line = '(.*)@abc.com=$[EMAIL PROTECTED]';
> ($left,$right) = split '=', $line,2;
> $input =~ s/$left/$right/;
> print $input;
>
> results -> \[EMAIL PROTECT