Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Perl flags -pe, -pi, -p, -w, -d, -i, -t?
- perldoc perlrun
- while (<>) {
- # exec here
- }
- continue {
- print or die "-p destination: $!n";
- }
- perl -e '$x = "Hello world!n"; print $x;'
- $ perl -MO=Deparse -p -e 1
- LINE: while (defined($_ = <ARGV>)) {
- '???';
- }
- continue {
- die "-p destination: $!n" unless print $_;
- }
- -e syntax OK
- $ perl -MO=Deparse -p -i -e 1
- BEGIN { $^I = ""; }
- LINE: while (defined($_ = <ARGV>)) {
- '???';
- }
- continue {
- die "-p destination: $!n" unless print $_;
- }
- -e syntax OK
- $ perl -MO=Deparse -p -i.bak -e 1
- BEGIN { $^I = ".bak"; }
- LINE: while (defined($_ = <ARGV>)) {
- '???';
- }
- continue {
- die "-p destination: $!n" unless print $_;
- }
- -e syntax OK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement