in reply to USE, but fail nicely
Two characters, my friend. eval with braces forces compilation before "evaluation", which makes it function more like do{}. If you pass a scalar, it is compiled after the main program and any compilation errors are directed to the program, not your STDERR. This is the difference between 'eval EXPR' and 'eval BLOCK'.#!/usr/bin/perl -w use strict; eval qq{ use Time::HiRes qw(time); }; print "\n";
|
|---|