- or download this
BEGIN { require Foo; Foo->import(@LIST) }
- or download this
while (<>) {
# ... your code here ...
print $_;
}
- or download this
perl -p -e "$_ = reverse $_" f1
- or download this
print -p -e "$_ = reverse $_; $i ++; END { print qq'Total lines $i.' }
+" f1
- or download this
$a = 6;
*b = \ $a;
...
*b = \ @a;
pop @b;
print "@a"; # prints 1 2
- or download this
use Shell;
$a = Shell::cat("file.text");
Shell::cp("a.txt", "b.txt");
- or download this
package Shell;
...
sub cp {
`cp @_`
}
- or download this
package Shell;
...
$AUTOLOAD =~ s/^.*:://; # Strip out the package name from the sub
+'s name (in this case Shell::)
`$AUTOLOAD @_`
}