----- Original Message -----
Sent: Thursday, January 02, 2003 8:14
PM
Subject: Re: Variable in split
function
What does your $Line look like?
Your code works fine for me when I use something like
this:
$pattern = ":";
$Line = "A:B:C:D:E";
@Arr =
split(/$pattern/, $Line);
print "@Arr", "\n";
print $Arr[0],
"\n";
Kind regards,
Trevor
Joerges
----------------------------------------------------
$_=q;rrUSFWPSZK.ZKPFSHFT,rkvtuZbopuifsZQZibdl
rrqpxfsfeZcyZQ,,riuuq://xxx.%.dpn,ru~@%.dpn
,,rrr8-),,;;s;\~;kpfshft;g;s;\%;tfoenjnf;g;y;B-x;A-w;;
s;P;perl;g;s;,;\n;g;s;Y;
;g;s;q;\t;g;print;
----------------------------------------------------
----- Original Message -----
Sent: Monday, December 30, 2002 5:44
PM
Subject: Variable in split
function
Hi all,
Can we use a variable in the /PATTERN/ argument of the
split function. I tried it but was not able
to get it to work. Is there something I am
missing??
$pattern = ":";
@Arr = split(/$pattern/, $Line);
puts the whole $Line as the first element in the array
without splitting.
Thanks in advance and a
Happy New
Year.