Perl Help - Split a string (UK based)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Monkey
    New Member
    • Jun 2006
    • 1

    Perl Help - Split a string (UK based)

    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\m att.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 :)
  • ghostdog74
    Recognized Expert Contributor
    • Apr 2006
    • 511

    #2
    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\m att.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

    Comment

    • pavan pothuru
      New Member
      • Aug 2006
      • 3

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

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

      Comment

      Working...