#!/usr/bin/perl my $pattern = "mkdir a &";if ($pattern =~ /&$/) { print "Yes, there is a & at the end of the string."}
Standard input is empty
Yes, there is a & at the end of the string.
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!