On Mon, 29 Mar 2004 15:05:34 +0530 "MuthuKumar" <[EMAIL PROTECTED]> wrote:
> Hai all. > > I want to make a script which converts like (pErl1234test = > perl).I > wrote like > > #!/usr/bin/perl > print "Enter ur name" > $name = <STDIN> > $org_name = $name > $name =~ s/\W.*//; #change 1 This RE deletes zero or more non-alphanumeric characters followed by anything. So it deletes the entire string, since there was no match on a non-alphanumeric character. You probably meant something like: $name =~ s/\d+.*//; which matches one or more digit characters followed by anything. See the perlre man page for details on Perl regular expressions. -- Smoot Carl-Mitchell Systems/Network Architect email: [EMAIL PROTECTED] cell: +1 602 421 9005 home: +1 480 922 7313 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>