View
1.217
Download
0
Category
Preview:
Citation preview
PowerPoint Presentation
Maybe you do not know that ...
$dbh->do() or die;
$sth->execute() or die;#$sth non select statement
So, zero can be true
0.00E0+0 0
0 but true
perl -wE 'say "0 but true"+5'#5
perl -wE 'say "0 but true!"+5'Argument "0 but true!" isn't numeric in addition (+) at -e line 1.#5
local
our $l = 5; {local $l = 4; say $l}; say $l;
#4#5
my $l = 5; {local $l = 4; say $l}; say $l;
#Can't localize lexical variable $l at -e line 2.
my $l = { a => 5 };
{ local $l->{a} = 4; say $l->{a};};
say $l->{a};
#4#5
my @l = (2,3,5);
{ local $l[2] = 4; say $l[2];};
say $l[2];
#4#5
{ local $h->{RaiseError}; ...}
One line file slurp
$content = do {local(@ARGV, $/) = $f; }
perl -e 'while (){ }' f1 f2 f3
@INC
use everywhere 'MooseX::Declare', matching => '^MyApp', use_here => 0;
@INC hooks
SubroutineArrayObject
perldoc -f require
$_
my @ar = qw/h e l l o/;
foreach (@ar) { do_something(); say $_;}
Somewhere in outer space...
...Open (my $fh, '
Recommended