I don't know about you guys, but to me, the less typing the better. That's why i have put together this simple module to automate slurp. I'm sure there is already something like this out there, but I'm new to Perl and through you guys might enjoy it!
#!/usr/bin/perl package Slurp; use strict; use warnings; use Carp; { no strict 'refs'; *main::slurp = \&Slurp::slurp; } sub slurp { { local $/; open(my $fh,'<',$_[0]) || croak " Cant open [ $_[0] ] -- ($!) "; $_ = <$fh>; close($fh); return($_); } } 1;
In reply to Automated Slurp by urthwrm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |