Help for this page

Select Code to Download


  1. or download this
    while (<IN>) {
       # print if /$pattern/; # normal "grep"
       print unless /$pattern/; # grep -v
    }
    
  2. or download this
    print $_ unless $_ =~ /$pattern/;
    
  3. or download this
    perl -e 'print "How sweet does a rose smell? "; chomp ($n = <STDIN>); 
    +$rose = "smells sweet to degree $n"; *other_name = *rose; print "$oth
    +er_name\n"'