Penguin
Diff: PerlOneLiners
EditPageHistoryDiffInfoLikePages

Differences between current version and predecessor to the previous major change of PerlOneLiners.

Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History

Newer page: version 31 Last edited on Friday, May 26, 2006 10:29:28 am by CraigBox
Older page: version 30 Last edited on Friday, August 26, 2005 2:42:04 am by AristotlePagaltzis Revert
@@ -67,26 +67,8 @@
 }' 
 </verbatim> 
  
 Both of these will read whitespace-separated tabular data from stdin(3) or from the files passed, and will write to tab-separated tabular data to stdout(3). 
-  
-!! Trace execution in a [Perl] script  
-  
-Getting a trace showing each executed line of code in sequence (think <tt>sh -x</tt> but for [Perl] scripts) is not obvious. perl(1)'s <tt>-D</tt> switch itself does not provide such functionality, but you can get there like so:  
-  
-<verbatim>  
-$ PERLDB_OPTS="NonStop=1 AutoTrace=1 frame=2" perl -dS program  
-</verbatim>  
-  
-Another option is to install the [Devel::Trace | http://search.cpan.org/dist/Devel-Trace/] module and simply use it on the script using the <tt>-d:Trace</tt> argument:  
-  
-<verbatim>  
-$ perl -d:Trace program  
-</verbatim>  
-  
-This does not work everywhere, but is has the advantage that you can easily influence the amount of trace output from within the script. [Perl] developers will therefore probably prefer to use the module.  
-  
-''This really belongs on a ~PerlNotes page, not here.''  
  
 !! List all currently running processes 
  
 This is useful if you suspect that ps(1) is not reliable, whether due to a RootKit or some other cause. It prints the process ID and command line of every running process on the system (except some "special" kernel processes that lie about/don't have command lines). 
@@ -120,7 +102,4 @@
  
 Together, these switches effectively mean that we get null terminated lines from files, with the nulls removed on input. So we get the command line arguments listed in a <tt>/proc/*/cmdline</tt> file as nice list of separate strings. And because <tt>join()</tt> expects a list, <tt><></tt> returns all "lines" (ie command line arguments) at once, which <tt>join()</tt> then dutifully puts together with spaces between. 
  
 The printf(3) is straightforward. 
-  
-----  
-AddToMe