Connecting Tech Pros Worldwide Forums | Help | Site Map

Perl Help - Split a string (UK based)

Newbie
 
Join Date: Jun 2006
Posts: 1
#1: Jun 8 '06
Hi,

Just coming back to perl after some time off, I think I need to use the split funtion.

I want to convert $username=FEL\matt.honston, to $username=matt.honston and remove or split the FEL\ from the string (yes I'm using the whoaim command in XP)

I know I need to use the split function, but just can't to remember the syntax.


Thanks,

Monkey :)

Expert
 
Join Date: Apr 2006
Posts: 512
#2: Jun 9 '06

re: Perl Help - Split a string (UK based)


Quote:

Originally Posted by Monkey

Hi,

Just coming back to perl after some time off, I think I need to use the split funtion.

I want to convert $username=FEL\matt.honston, to $username=matt.honston and remove or split the FEL\ from the string (yes I'm using the whoaim command in XP)

I know I need to use the split function, but just can't to remember the syntax.


Thanks,

Monkey :)

...on the command line type
perldoc -f split
Newbie
 
Join Date: Aug 2006
Posts: 3
#3: Aug 18 '06

re: Perl Help - Split a string (UK based)


hi, i am pavan. split function example for ur username.

($a,$b)=split(/\/,$username);
Reply


Similar Perl bytes