Hello stefan,
  You will need just a basic regex, not a split....

my $string='#  FRI MAY 02';
$string=/(.*?)\s+(.*)/;
my $bash=$1;
my $rest=$2;

Shawn

 
----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 04, 2002 6:49 AM
Subject: split


hi guys,
I would like to split a line like that

#  FRI MAY 02 ....

in two parts:

$bash = #
$rest = FRI MAY....


in my version ($bash, $rest) = split(/\s/, $line);

$rest only contains "FRI" because the line is splitted at every blank. how can 
I achieve
that the line ist  splitted only at the first blank after # ???

thanks in advance!

greetings

stefan

 
-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to