#!/usr/bin/perl -w use strict; print ";-)\n" if "foo" =~ //; "bar" =~ /bar/; print ":-(\n" if "foo" =~ //;
http://ru-perl.livejournal.com/446147.html