>I have a regular expression problem > >how do i use scalar variables in substitution and complex matching? > >eg I want the following to work. > >$string =~ s/^$variable//; > >$string =~ m/^([^$variable]*)/; > > >thanks in advance for your help. > >-Jeremy A.
$x = "Cowboy"; $y = "ow"; $x =~ s/$y/-/; print "$x"; <>; # Output is "C-boy" _________________________________________________________________ Get FREE company branded e-mail accounts and business Web site from Microsoft Office Live http://clk.atdmt.com/MRT/go/mcrssaub0050001411mrt/direct/01/ _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs