bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how do I split variables?


From: Lack Mr G M
Subject: Re: how do I split variables?
Date: Fri, 22 Sep 2000 16:44:05 BST

In article <8qf7a1$gq3$1@news.online.de>, "Kjeld Peters" <ich@kjeld.de> writes:
|> 
|> I'm having some trouble with a script:
|> 
|> $FILE (contains recvq/fax00044.tif, for example. the number rises by 1,
|> everytime a fax is             recieved)
|> I want to change the value of $FILE(recvq/fax00044.tif) to
|> recvq/someuser/fax00044.tif.....
|> Since there is no way to change $FILE's value, there must be some special
|> wordsplit function or so........

   Why is there no way to change $FILEs values?

   $FILE =~ s|(/fax\d+\.tif)$|/someuser$1|;

ie: change /faxnnnn.tif to /someuser + what_was_matched, making sure you
match at end of line (or string).



-- 
--------- Gordon Lack --------------- gml4410@ggr.co.uk  ------------
This message *may* reflect my personal opinion.  It is *not* intended
to reflect those of my employer, or anyone else.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]