WC:

Thanks for your response!

I think what you suggested works fine for normal shell commands, but it
doesn't appear to work for the Perl debugger.

Here's a sample session, running on a Linux machine:

bash-2.05b$ cat test.pl    
#!/usr/bin/perl

$x = 1;
print "x:$x\n";

bash-2.05b$ perl -d test.pl | tee xxx 2>&1 > yyy

Loading DB routines from perl5db.pl version 1.28
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

main::(test.pl:3):      $x = 1;
  DB<1> s
main::(test.pl:4):      print "x:$x\n";
  DB<1> p $x
1
  DB<2> q
bash-2.05b$ ls -ralt
total 10116
...
-rw-rw-r--    1 gbowlby  isp             0 Jul 12 11:21 yyy
-rw-rw-r--    1 gbowlby  isp             0 Jul 12 11:21 xxx
drwxrwxr-x    3 gbowlby  isp          4096 Jul 12 11:21 .
bash-2.05b$ cat xxx
bash-2.05b$ cat yyy
bash-2.05b$

So no output was sent to either the file "xxx" or "yyy".

I would like to see the results of the Perl debugging session in a file.

Gavin

-----Original Message-----
From: Chasecreek Systemhouse [mailto:[EMAIL PROTECTED] 
Sent: Sunday, July 09, 2006 3:21 PM
To: beginners perl
Subject: Re: question on redirecting output of Perl debugger commands

On 7/7/06, Gavin Bowlby <[EMAIL PROTECTED]> wrote:
> Is there a way to redirect the output of a debugger command to a file?

What I use is Linux specific, sort of varies by bash and distro for
example, but you are welcome to try it out (I asked in irc #bash
before posting here) -

ls -ial |tee captured_output 2>&1 | less

You will need to play with arrangement to get the desired effect.

-- 
WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to