[ale] Off topic - perl question

Eidson, Eric H. eeidson at z-tel.com
Wed Aug 25 16:22:27 EDT 1999


Try the one combination you missed:

@fi = split ('\.',$test);

	--Hunter

> -----Original Message-----
> From: Jim Lynch [mailto:jwl at sgi.com]
> Sent: Wednesday, August 25, 1999 3:15 PM
> To: Ale
> Subject: [ale] Off topic - perl question
> 
> 
> What is wrong with this?  I can't make it do what I want it to.
> 
> $test = "abc.xyz";
> 
> @fi = split (".",$test);
> print "$#fi";
> print " splitting $test, first part = $fi[0], second part = $fi[1]\n";
> 
> # $#fi = -1, according to the output
> 
> $test = "abc,xyz";
> 
> @fi = split (",",$test);
> print "$#fi";
> print " splitting $test, first part = $fi[0], second part = $fi[1]\n";
> 
> # this works fine so it is the period that is causing the problem but
> I've tried:
> @fi = split ("\.",$test);
> 
> @fi = split ('.',$test);
> 
> @fi = split (/./,$test);
> 
> @fi = split (/"."/,$test);
> 
> @fi = split (/"\."/,$test);
> 
> to no avail.
> 
> Suggestions appreciated.
> 
> Thanks,
> Jim.
> 






More information about the Ale mailing list