Like this...

$string="1
blabla";

my @lines = split("\n", $string);

# testing...
print "1: $lines[0]\n";
print "2: $lines[1]\n";

See perldoc -f split if you want more info on the command.

Rob

-----Original Message-----
From: Pablo Fischer [mailto:[EMAIL PROTECTED]
Sent: Monday, August 18, 2003 11:58 AM
To: [EMAIL PROTECTED]
Subject: Split NewLines


Hi!

I have in $string something like:

$string="1
blabla";

When Im printing $string I get a new line between 1 and blabla, now I needt
o 
split that.. in

my($number, $real_string) = split...

How can I split it? 

Thanks!
Pd. Its a scalar variable
Pablo
-- 
Pablo Fischer Sandoval ([EMAIL PROTECTED])
http://www.pablo.com.mx
http://www.debianmexico.org
GPG FingerTip: 3D49 4CB8 8951 F2CA 8131  AF7C D1B9 1FB9 6B11 810C
Firma URL: http://www.pablo.com.mx/firmagpg.txt

-- 
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