topical media & game development
basic-regex-26-GlobalReplace.pl / pl
#!/usr/bin/perl -w
use strict;
print "This example uses the global modifier, 'g'\n\n";
my myOnceString = myGlobalString = myPattern = "Star";
my myOnceString =~ s/myPattern/myReplacementString/;
myTestString'.\n\n";
print "After a single replacement it became 'myGlobalString'.\n\n";
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.