http://qs321.pair.com?node_id=652363


in reply to Matching @ in string

You have introduced the array @t which is interpolated. So you have to quote the @ (or write q{h@t}).
perl -e 'if ("h\@t" =~ /(\@)/ ) { print $1 }'
Example for an array interpolation:
#!/usr/bin/perl use strict; use warnings; my @friends = ('Margaret', 'Richard', 'Carolyn', 'Rohan', 'Cathy', 'Yukiko'); print "Friends: @friends\n";