A perl question

Bob Bell bbell at hp.com
Tue Apr 20 11:31:00 EDT 2004


On Tue, Apr 20, 2004 at 11:20:54AM -0400, brian <lists at karas.net> wrote:
> Every s/ operation I come up with always ends up replacing ::tag with
> the literal "$tag".

Can you share code?  I don't see why you'd have a problem.

$ perl -pe '$tag="MyTag";s/::tag/$tag/g;' <<< "foo ::tag ::other"
foo MyTag ::other

-- 
Bob Bell



More information about the gnhlug-discuss mailing list