Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Regex: Case insensitive search but case sensitive replace

by ehdonhon (Curate)
on Nov 17, 2003 at 11:54 UTC ( #307631=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    while ( chomp( my $line = <DATA> ) ) {
      $line =~ s/(Fred)/"$1"/i;
    ...
    Hello, my name is FRED!
    fREd went to the store.
    Nobody was home, except for freD.
    
  2. or download this
    my $tag = 'jane';
    while ( <DATA> ) {
    ...
    __DATA__
    - John is following jane
    - John is following Jane
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://307631]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2023-11-28 22:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?