This can be done using the -l and -0 command line switches or by manually changing $/ .
-l and -0 are order dependent and may be used multiple times.
Thanks for inspiring me to read the perlrun documentation.
examples:
# -0 : set input separator to null # -l012 : chomp input separator (null) # and set output separator explicitly to newline, octol 012. # -p : print each line # -e0 : null program perl -0 -l012 -pe0 < /proc/$$/environ
.
# -l : chomp input separator (/n) (with -p / -n) # and set output separator to current input separator (/n) # -0 : set input separator to null # -p : print each line # -e0 : null program perl -l -0 -pe0 < /proc/$$/environ
.
# partially manual version # -l : chomp input separator (/n) (with -p / -n) # and set output separator to current input separator (/n) # -p : print each line # -e : set input record separator ($/) explicitly to null perl -lpe 'INIT{$/="\0"}' < /proc/$$/environ
problems with the kit:
.
spazm
source share