Re: [Perl-unix-users] Problem that I am having with split command

2004-04-14 Thread Jon Shorie
/[\-\/\.]/, $string; > > > > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of > Jon Shorie > Sent: Wednesday, April 14, 2004 1:13 PM > To: [EMAIL PROTECTED] > Subject: [Perl-unix-users] Problem that I am having with split

Re: [Perl-unix-users] Problem that I am having with split command

2004-04-14 Thread Andy_Bach
'.' is an RE metachar, so, at the least, you want to escape it: split(/\./ If you're fairly confident about the format: my ($a, $b, $c, $d, $e, $f) = split(/[^\d]/, $projectnumber); that is, split on non-digits or specify the actual chars: my ($a, $b, $c, $d, $e, $f) = split(/[-\/.]/, $projectnum

Re: [Perl-unix-users] Problem that I am having with split command

2004-04-14 Thread John Kulas
Jon, the dot (or period) is a reserved character, remember? You need to escape it if you want to use that character. Try ($c,$d,$e,$f) = split(/\./,$g); - John Kulas ___ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.Ac

RE: [Perl-unix-users] Problem that I am having with split command

2004-04-14 Thread Stacy Doss
t. ($a,$b,$c,$d,$e,$f) = split /[\-\/\.]/, $string; -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Jon Shorie Sent: Wednesday, April 14, 2004 1:13 PM To: [EMAIL PROTECTED] Subject: [Perl-unix-users] Problem that I am having with split command If I have the

[Perl-unix-users] Problem that I am having with split command

2004-04-14 Thread Jon Shorie
If I have the following kind of data 500/00-7.1.19.3 I want to split it into separate variables as such $a = "500" $b = "00" $c = "7" $d = "1" $e = "19" $f = "3" Here is what I have so far ($a,$g) = split("/",$projectnumber); ($b,$g) = split(/-/,$pa); ($c,$d,$e,$f) = split(/./,$g); print "$a xx