summaryrefslogtreecommitdiffstats
path: root/emacs.d/snippets/text-mode/perl-mode/eval
diff options
context:
space:
mode:
Diffstat (limited to 'emacs.d/snippets/text-mode/perl-mode/eval')
-rw-r--r--emacs.d/snippets/text-mode/perl-mode/eval8
1 files changed, 8 insertions, 0 deletions
diff --git a/emacs.d/snippets/text-mode/perl-mode/eval b/emacs.d/snippets/text-mode/perl-mode/eval
new file mode 100644
index 0000000..c1f1e1b
--- /dev/null
+++ b/emacs.d/snippets/text-mode/perl-mode/eval
@@ -0,0 +1,8 @@
+#name : eval { ... } if ($@) { ... }
+# --
+eval {
+ ${1:# do something risky...}
+};
+if (\$@) {
+ ${2:# handle failure...}
+} \ No newline at end of file