in reply to Re^3: Beware of global! And bless the local!
in thread Beware of global! And bless the local!

I have the following yasnippets defined in my emacs.

$ cat ~/.emacs.d/snippets/cperl-mode/slurp # -*- snippet -*- #key: slurp #group: slurp #name: Slurp file-handle # -- my $${1:variable} = do { local $/; <$${2:fh}>; };
$ cat ~/.emacs.d/snippets/cperl-mode/slurp.open # -*- snippet -*- #key: slurp #group: slurp #name: Open and slurp # -- my $${1:variable} = do {$> local $/;$> open( my $${2:fh}, q{<}, ${3:$WHAT} )$> or die qq{Can't open "$3": $!\n}; <$$2>;$> };$>

The cake is a lie.
The cake is a lie.
The cake is a lie.