Dec 30, 2005 #1 PerlElvir Technical User Joined Aug 23, 2005 Messages 68 Have can I replace or delete some text from var? example: $var= ; 1679.25 FF =- something =70,00 now I want to delete from ; to - and get $var=- something =70,00
Have can I replace or delete some text from var? example: $var= ; 1679.25 FF =- something =70,00 now I want to delete from ; to - and get $var=- something =70,00
Dec 30, 2005 #2 rharsh Technical User Joined Apr 2, 2004 Messages 960 Location US One way is with substitution - something like this should work: Code: $var =~ s/;[^-]+//; With this problem, you could also accomplish the same thing with a combination of the index and substr functions. Upvote 0 Downvote
One way is with substitution - something like this should work: Code: $var =~ s/;[^-]+//; With this problem, you could also accomplish the same thing with a combination of the index and substr functions.
Dec 30, 2005 Thread starter #3 PerlElvir Technical User Joined Aug 23, 2005 Messages 68 yap work fine thx dude Upvote 0 Downvote