#!/usr/bin/perl -w use strict; my $var = "WooHoo\n"; # I know that this will print ... print $var if $var =~ /^Woo/; # and I know that this will print ... print $var if $var !~ /^Hoo/; # and I think I understand whats # going on here ... $var =~ s/W/H/; print $var; # But I didn't expect this ... $var !~ s/H/W/; print $var; #### Plankton@linux:~/perl/perlmonks> ./tilda_q.pl Useless use of not in void context at ./tilda_q.pl line 18. WooHoo WooHoo HooHoo WooHoo