sunckell wrote:
Hello Perl People
I was wondering if someone could enlighten me on an observation I
have been seeing..
A little Background info:
Where I work we have been seeing very slow ssh connections times
(it's not DNS. Maybe NIS, NFS, but definitely not DNS).
Anyw
On Mon, Oct 17, 2011 at 2:05 PM, sunckell wrote:
> So here we are back to the script.. The script works as
> expected, with one item of strangeness. I was expecting the
> log messages to be printed in the order they complete. For
> example, if the connection attempt at 12:01 took 75 seconds to
> r
quot;uname -n";
my $out = "";
sshopen2("$user\@$host", *READER, *WRITER, "$cmd") || die "ssh:
$!";
while () {
chomp();
#print "$_\n";
$out = $_;
}
close(READER);
close(WRITER);
return $out;
}
# ---
# ---
trapd...@trapd00r.se writes:
> And if you want to work with 256 colors (note that not all terminals support
> this, and it should be avoided if it's not for your own use) you can do
> something like this:
>
>
> my @colors;
> for(my $i=0;$i<256;$i++) {
> push(@colors, "\033[38;5;$i".'m');
> }
> p
On Thu, May 27, 2010 at 6:22 PM, Harry Putnam wrote:
> I wondered if anyone could steer me to some information about making
> perl script output appear in color highlight on stdout.
>
> Something like what modern grep does on linux, where the searched term
> appears in some col
On 27/05/10 22:16 -0500, Bryan Harris wrote:
my $e = "\033[0m";
my %cc = (
white => "\033[1;37m",
ltgray => "\033[0;37m",
gray => "\033[1;30m",
black => "\033[0;30m",
red => "\033[0;31m",
ltred => "\033[1;31m",
green => "\033[0;32m",
l
Try this
> I wondered if anyone could steer me to some information about making
> perl script output appear in color highlight on stdout.
>
> Something like what modern grep does on linux, where the searched term
> appears in some color (red) in the output to tty.
>
At 10:22 AM -0500 5/27/10, Harry Putnam wrote:
I wondered if anyone could steer me to some information about making
perl script output appear in color highlight on stdout.
Something like what modern grep does on linux, where the searched term
appears in some color (red) in the output to tty
I wondered if anyone could steer me to some information about making
perl script output appear in color highlight on stdout.
Something like what modern grep does on linux, where the searched term
appears in some color (red) in the output to tty.
--
To unsubscribe, e-mail: beginners-unsubscr
getting data back to STDOUT once
> I assign it to a file
>
>
>
> This is how I got it to work. However any STDOUT completion
> messages will need to be done outside the brace.
>
> }
>
> local *STDOUT;
Ok, that seems do it. I have for the most part never u
Uri Guttman wrote:
"SHC" == Shawn H Corey writes:
SHC> Uri Guttman wrote:
>>
>> print <
>> All STDOUT/STDERR will be assigned to this scripts audittrail log!!
>> All STDOUT/STDERR will be assigned to this scripts audittrail log!!
>&
>>>>> "SHC" == Shawn H Corey writes:
SHC> Uri Guttman wrote:
>>
>> print <> All STDOUT/STDERR will be assigned to this scripts audittrail log!!
>> All STDOUT/STDERR will be assigned to this scripts audittrail log!!
>> All STD
This is how I got it to work. However any STDOUT completion messages will need
to be done outside the brace.
}
local *STDOUT;
if ( $GlblInfo{audit} ) {
printf "All STDOUT/STDERR will be assigned to this scripts audittrail
log!!\n";
printf "All STDOUT/STDERR will be a
Uri Guttman wrote:
""D" == "Wagner, David <--- Senior Programmer Analyst --- CFS"
> writes:
"D> printf "All STDOUT/STDERR will be assigned to this scripts audittrail
log!!\n";
"D> printf "All STDOUT/STDERR will be a
>>>>> ""D" == "Wagner, David <--- Senior Programmer Analyst --- CFS"
>>>>> > writes:
"D> printf "All STDOUT/STDERR will be assigned to this scripts audittrail
log!!\n";
"D> printf "All STDOU
> -Original Message-
> From: Tony Esposito [mailto:tony1234567...@yahoo.co.uk]
> Sent: Tuesday, July 21, 2009 08:08
> To: beginners@perl.org
> Subject: Fw: Having problems getting data back to STDOUT once
> I assign it to a file
>
> Back to the question at han
Jay Savage wrote:
On Tue, Jul 21, 2009 at 9:25 AM, Shawn H. Corey wrote:
John W. Krahn wrote:
[snip]
close(STDERR);
open(STDOUT , '>') || die "Unable to open STDOUT: $!";
You're not opening STDOUT to anything. And you closed STDERR so the die
me
Back to the question at hand - have you tried using 'tee'
use File::Tee qw(tee);
# simple usage:
tee(STDOUT, '>', 'stdout.txt');
Tony
From: John W. Krahn
To:
Sent: Tuesday, 21 July, 2009 8:41:25
Subject: Re: Having problems
On Tue, Jul 21, 2009 at 9:25 AM, Shawn H. Corey wrote:
> John W. Krahn wrote:
[snip]
>>>> close(STDERR);
>>>> open(STDOUT , '>') || die "Unable to open STDOUT: $!";
>>>
>>> You're not opening STDOUT to anyth
( $GlblInfo{audit} ) {
printf "\n\n*Should be last line in the audittrail
file...*\n\n";
close(STDOUT);
close(STDERR);
open(STDOUT , '>') || die "Unable to open STDOUT: $!";
You're not opening STDOUT to anything. And you clo
;\n\n*Should be last line in the audittrail
file...*\n\n";
close(STDOUT);
close(STDERR);
open(STDOUT , '>') || die "Unable to open STDOUT: $!";
You're not opening STDOUT to anything. And you closed STDERR so the
die message can
n the audittrail
file...*\n\n";
close(STDOUT);
close(STDERR);
open(STDOUT , '>') || die "Unable to open STDOUT: $!";
You're not opening STDOUT to anything. And you closed STDERR so the
die message can't go anywhere. In fact, it
file...*\n\n";
close(STDOUT);
close(STDERR);
open(STDOUT , '>') || die "Unable to open STDOUT: $!";
You're not opening STDOUT to anything. And you closed STDERR so the die
message can't go anywhere. In fact, it goes into an infin
n.
Try "perldoc -f select":
select FILEHANDLE
select Returns the currently selected filehandle. If FILEHANDLE is
supplied, sets the new current default filehandle for output.
[...]
That way you could re-select() a previously saved handle to STDOUT.
HTH,
Thoma
*\n\n";
close(STDOUT);
close(STDERR);
open(STDOUT , '>') || die "Unable to open STDOUT: $!";
You're not opening STDOUT to anything. And you closed STDERR so the die
message can't go anywhere. In fact, it goes into an infinite loop. It
can'
I am done processing and I want to place the final output line also on
the screen. Here is what I have:
if ( $GlblInfo{audit} ) {
printf "\n\n*Should be last line in the audittrail
file...*\n\n";
close(STDOUT);
close(STDERR);
o
That works like a charm -- thanks!
"Chas. Owens" wrote on 07/05/2009 03:57:34 AM:
> From:
>
> "Chas. Owens"
>
> To:
>
> Eric Veith/Germany/i...@ibmde
>
> Cc:
>
> beginners@perl.org
>
> Date:
>
> 07/05/2009 03:58 AM
>
> Subj
On Thu, Jul 2, 2009 at 04:36, Eric Veith wrote:
>
> Hello List,
>
> as part of a Perl script of mine, I want to execute a program, get its
> return code AND capture its output on both STDERR and STDOUT. I tried
> IO::Handle, but that only gives me STDOUT and not the return cod
Hello List,
as part of a Perl script of mine, I want to execute a program, get its
return code AND capture its output on both STDERR and STDOUT. I tried
IO::Handle, but that only gives me STDOUT and not the return code. Using
qr//, I cannot read linewise and have to load the complete program
On Jan 28, 9:46 pm, r...@kuicr.kyoto-u.ac.jp (Raymond Wan) wrote:
> Hi,
>
> inetquestionwrote:
> > for the example perl script below is there a way to avoid errors from
> > showing up in stdout if the shell script being called does not exist?
> > The shell script bein
On Jan 28, 9:46 pm, r...@kuicr.kyoto-u.ac.jp (Raymond Wan) wrote:
> Hi,
>
> inetquestionwrote:
> > for the example perl script below is there a way to avoid errors from
> > showing up in stdout if the shell script being called does not exist?
> > The shell script bein
Hi,
inetquestion wrote:
for the example perl script below is there a way to avoid errors from
showing up in stdout if the shell script being called does not exist?
The shell script being called is not in the same directory as the perl
script, but is in the path. Otherwise I would just do a
for the example perl script below is there a way to avoid errors from
showing up in stdout if the shell script being called does not exist?
The shell script being called is not in the same directory as the perl
script, but is in the path. Otherwise I would just do a check to see
if it exist
Hello beginners,
any hints on this problem?
win32...
I have N threads. in each thread I want to run a command and
redirect it's STDERR and STDOUT to a filehandle/socket opened
in the main thread. I tried with IPC::Run3 but the outputs get
scrambled.
--
Best regards,
Alex
On Jul 17, 9:24 pm, [EMAIL PROTECTED] (Yitzle) wrote:
> On Wed, Jul 16, 2008 at 9:01 PM, <[EMAIL PROTECTED]> wrote:
> > Hi experts
> > When I am using STDERR and STDOUT for mixed output, I found a problem.
> > Output of STDERR and STDOUT can not be mix
On Wed, Jul 16, 2008 at 9:01 PM, <[EMAIL PROTECTED]> wrote:
> Hi experts
> When I am using STDERR and STDOUT for mixed output, I found a problem.
> Output of STDERR and STDOUT can not be mixed.
> Here is the snippet.
>
> #####
> pri
Hi experts
When I am using STDERR and STDOUT for mixed output, I found a problem.
Output of STDERR and STDOUT can not be mixed.
Here is the snippet.
#
print STDOUT "This is STDOUT\n";
print STDERR "This is STDERR\n";
print STDO
er value
on the next lie?
> $cps = check_ps($entry);
> write PROC1_OUT;
> }
>
> foreach $entry (@running_procs2) {
> $entry =~ s/Element\s\:\s//g;
> $entry =~ s/\s*Manager*//g;
The pattern 'Manager*' matches 'Manage' or 'Manager' or
cps
.
foreach $entry (@running_procs) {
print "entered foreach\n" if ($DEBUG);
$entry =~ s/Element\s\:\s//g;
# check ps...for $entry. If running, print up, else print down.
$cps = false;
$cps = check_ps($entry);
write PROC1_OUT;
}
foreach $entry (@runnin
processes inherit their parent's STDIN, STDOUT, and
STDERR. Try it and see for yourself, rather than telling the OP that
his program is wrong.
Paul Lalli
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
On Nov 1, 10:49 pm, [EMAIL PROTECTED] (Phillip Gonzalez)
wrote:
> I'm trying to print stdout to a file, then switch back to the default
> standard out so that it prints to the screen. This script takes a
> list of ip's and does a reverse lookup on them, it then save
On Thursday 01 November 2007 20:05, yitzle wrote:
>
> 1) You can use the backticks (``) or qx// quoting to capture the
> output which you can then write to a file
1.5) Use piped open:
open PIPE, '-|', 'host', '-W', '1', $ip or die "Cannot open pipe from
'host' $!";
> 2) Use the Perl select com
lly worked! LoL.
Thanks,
-phil
On Nov 1, 2007, at 10:17 PM, Rob Dixon wrote:
Phillip Gonzalez wrote:
Hi,
I'm trying to print stdout to a file, then switch back to the
default standard out so that it prints to the screen. This script
takes a list of ip's and does a reverse lookup on
Phillip Gonzalez wrote:
Hi,
I'm trying to print stdout to a file, then switch back to the default
standard out so that it prints to the screen. This script takes a list
of ip's and does a reverse lookup on them, it then saves the output to
"reverse.txt".
Here's m
1) You can use the backticks (``) or qx// quoting to capture the
output which you can then write to a file
2) Use the Perl select command. From the Perldoc:
select FILEHANDLE
... a write or a print without a filehandle will default to this FILEHANDLE
3) Use the shell's own redirection. See
http:/
Hi,
I'm trying to print stdout to a file, then switch back to the default
standard out so that it prints to the screen. This script takes a
list of ip's and does a reverse lookup on them, it then saves the
output to "reverse.txt".
Here's my code:
#!/usr/
On Jun 22, 1:43 pm, [EMAIL PROTECTED] (Ben Edwards) wrote:
> Cool, the * is by reference.
If you re-read my post, you will see the word "reference" no where in
it. This has nothing to do with references. It involves typeglobs.
By the way, this is now the third time (that I've noticed) that you'
On 6/22/07, Ben Edwards <[EMAIL PROTECTED]> wrote:
Cool, the * is by reference.
snip
It is a lot more complicated than that. Typeglobs allow you access to
the symbol table. You can do some really cool things like
*hw = sub { print "Hello, ", shift, "\n" };
hw("bork")
--
To unsubscribe, e-ma
s of places.
>
> I have been asked to change the program so if -m (manual) flag is
> passed the stuff that goes to the log file is send to standard out
> instead. Is it possible to change the above command to redirect
> LOGFILE to STDOUT (i.e. make the two the same thing.
>
> i.e
uff that goes to the log file is send to standard out
> instead. Is it possible to change the above command to redirect
> LOGFILE to STDOUT (i.e. make the two the same thing.
>
> i.e.
>
> if ( defined( $opt_m ) ) {
> open( LOGFILE, STDOUT );} else {
>
> open( LOGFIL
to standard out
instead. Is it possible to change the above command to redirect
LOGFILE to STDOUT (i.e. make the two the same thing.
Given those requirements, a simple solution would be:
unless (m_flag_given) {
open my $fh, '>>cronlog.txt' or die $!;
select $fh;
}
above command to redirect
LOGFILE to STDOUT (i.e. make the two the same thing.
i.e.
if ( defined( $opt_m ) ) {
open( LOGFILE, STDOUT );
} else {
open( LOGFILE, ">>cronlog.txt" );
}
I even tried:
LOGFILE = STDOUT;
But I get:
Bareword "STDOUT" not allowed while &q
Karyn Williams wrote:
> I have this script I have been working on where I need to redirect STDOUT
> and STDERR to files at the beginning of the script and then back to default
> (terminal) at the end of the script. I found an example on-line and used it
> and it works, however it
On 5/7/07, Karyn Williams <[EMAIL PROTECTED]> wrote:
I have this script I have been working on where I need to redirect STDOUT
and STDERR to files at the beginning of the script and then back to default
(terminal) at the end of the script. I found an example on-line and used it
and it
On 5/7/07, Karyn Williams <[EMAIL PROTECTED]> wrote:
I have this script I have been working on where I need to redirect STDOUT
and STDERR to files at the beginning of the script and then back to default
(terminal) at the end of the script. I found an example on-line and used it
and it
I have this script I have been working on where I need to redirect STDOUT
and STDERR to files at the beginning of the script and then back to default
(terminal) at the end of the script. I found an example on-line and used it
and it works, however it generates a warning when running my script. I
From: hOURS <[EMAIL PROTECTED]>
> If you are on windows, then see perlfaq8 if ActiveState perl for
> how to redirect STDOUT and STDERR when doing backticks. Believe where
> you want to be at.
>
> Wags ;)
> David R Wagner
>
>
> David, are you saying this
"Wagner, David --- Senior Programmer Analyst --- WGO" <[EMAIL PROTECTED]>
wrote:
> -Original Message-
> From: hOURS [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 19, 2007 13:17
> To: Perl Beginners
> Subject: Re: STDOUT
>
>
>
> Jend
From: hOURS <[EMAIL PROTECTED]>
> if ($return =~ / syntax OK$/) {
> print "$progname is OK\n";
> } else {
> print "$progname has errors\n";
> }
> }
>
> HTH, Jenda
>
>
>
> Thanks Jenda,
> I definitely do just want to check syntax and not execute the scripts.
>
> I r
> -Original Message-
> From: hOURS [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 19, 2007 13:17
> To: Perl Beginners
> Subject: Re: STDOUT
>
>
>
> Jenda Krynicky <[EMAIL PROTECTED]> wrote: From: hOURS
> > Hi,
> > I wrote to
Jenda Krynicky <[EMAIL PROTECTED]> wrote: From: hOURS
> Hi,
> I wrote to the list with this issue before and got some suggestions, but
> nothing worked. I ended up shelving it, but now would like to try again.
> I have a thousand scripts I'd like to check for syntax errors. (Long story
From: hOURS <[EMAIL PROTECTED]>
> Hi,
> I wrote to the list with this issue before and got some suggestions,
> but nothing worked. I ended up shelving it, but now would like to try again.
> I have a thousand scripts I'd like to check for syntax errors. (Long
> story that.) A
Hi,
I wrote to the list with this issue before and got some suggestions, but
nothing worked. I ended up shelving it, but now would like to try again.
I have a thousand scripts I'd like to check for syntax errors. (Long
story that.) All I need is a list of which ones have er
On Thu, 18 Jan 2007 20:28:42 -0600, David Moreno Garza wrote:
> On Thu, 2007-01-18 at 07:11 -0800, Peter Scott wrote:
>> my $output = `myperlscript.pl 2>&1`;
>> send_email($output) if $output;
>
> Isn't send_email($output) in this situation still going to happen? I
> mean, even of there is not out
On Thu, 2007-01-18 at 07:11 -0800, Peter Scott wrote:
> my $output = `myperlscript.pl 2>&1`;
> send_email($output) if $output;
Doubt:
Isn't send_email($output) in this situation still going to happen? I
mean, even of there is not output on "myperlscript.pl 2>&1", $output is
going to be set, meani
Igor, thanks for the tip!
A search of CPAN turned up IPC::Open3::Simple
Very cool... Very easy to use and exactly what I needed.
Separate callback subs for STDOUT and STDERR... just push anything fed to
them into an array... When all done, if array size > 0, fire off an email
with the conte
. The sending in an email part I can handle. and I think
> I can probably redirect the output of myperlscript.pl to a file and read
> that, but is there a better, more elegant way to capture any stdout/stderr
> output WITHOUT having to redirect and read another file?
Look up backticks in pe
nk
I can probably redirect the output of myperlscript.pl to a file and read
that, but is there a better, more elegant way to capture any stdout/stderr
output WITHOUT having to redirect and read another file?
Why don't you encapsulate the myperlscript.pl code on a reusable
module, then ju
part I can handle. and I think
> I can probably redirect the output of myperlscript.pl to a file and read
> that, but is there a better, more elegant way to capture any stdout/stderr
> output WITHOUT having to redirect and read another file?
Look up system2 in cpan.
--
Ken Foskey
FOSS
ipt.pl to a file and read
that, but is there a better, more elegant way to capture any stdout/stderr
output WITHOUT having to redirect and read another file?
Thanks!
-Dan
hOURS wrote:
>
> Thanks to John and Tom for suggesting "do" and "eval". I read up on those.
> I don't understand them entirely, but I experimented. They seem to
> accomplish about the same thing. I wrote two one-line programs:print
> eval(system('perl -c nextprogramtoexecute.pl')); and
rse, but there's also the -c option. I
thought I could put a line in the main program like
system('perl -c nextprogramtoexecute.pl');
and check to see if that gives me a syntax OK message or not. But I can't
figure out how to get a hold of the message. I figured it would be
could
put a line in the main program like
system('perl -c nextprogramtoexecute.pl');
and check to see if that gives me a syntax OK message or not. But I can't
figure out how to get a hold of the message. I figured it would be in STDOUT,
but I can't figure out how to make use
ogramtoexecute.pl');
and check to see if that gives me a syntax OK message or not. But I can't
figure out how to get a hold of the message. I figured it would be in STDOUT,
but I can't figure out how to make use of that. I have a PERL textbook in front
of me, but it says precious
hOURS wrote:
> Hi all,
Hello,
> So, many thanks in advance to anyone who can tell me how to use
> STDOUT for this. Or if you have another way to read that message
> before the program quits, or another way to test for syntax
> errors... that's cool too.
perldoc -f do
On 9/19/06, hOURS <[EMAIL PROTECTED]> wrote:
Asking it to 'require' a program with a syntax error will cause the main
program to quit and print out the appropriate error message for that. I
don't want that. I want it to keep going.
You probably want 'eval', but also check out the document
xecute.pl');
and check to see if that gives me a syntax OK message or not. But I
can't figure out how to get a hold of the message. I figured it would be in
STDOUT, but I can't figure out how to make use of that. I have a PERL
textbook in front of me, but it says preciou
hy this is happening?
Thanks.
First of all, FLOWTOOLS is not STDOUT.
You can't use "less" this way. "Less" is supposed to be used
on an interactive terminal. I know nothing about the
flow-tools. What are you trying to do?
--
To unsubscribe, e-mail: [EMAIL PROTECT
Hi,
I was running this command on my perl program,
open FLOWTOOLS, "|/usr/bin/flow-cat $start |
/usr/bin/flow-nfilter -f filter.tmp -F $direction
|/usr/bin/flow-stat -Pf8 | le
ss" or die $!;
It does output something on the screen when I run it
on FreeBSD 6.1/perl 5.8.8 (while on csh)
However, w
Hello,
In your daemon script,you can re-direct the STDIN/STDOUT/STDERR to the null
device like '/dev/null'.
open (STDIN, "/dev/null");
open (STDERR,">&STDOUT");
Then you can redefine the 'warn' and 'die' handler to the subrouti
an `open( STDERR, '>', 'error.log') ...` but is there a piece of
magic to duplicate that to STDOUT as well (ie same file output)
Ta
Ken Foskey
From command line, you could use tee( man 1 tee).
After a quick search, I found a perl module that presumably does the
sam
;>', 'error.log') ...` but is there a piece of
magic to duplicate that to STDOUT as well (ie same file output)
Ta
Ken Foskey
"Perldoc -f open" shows you how to create duplicate file
handles, e.g.:
use strict;
use warnings;
open (FH, '>out') or die(&qu
On 8/29/06, Ken Foskey <[EMAIL PROTECTED]> wrote:
I can `open( STDERR, '>', 'error.log') ...` but is there a piece of
magic to duplicate that to STDOUT as well (ie same file output)
open(STDERR, '>', 'error.log') or die "Can't r
but is there a piece of
magic to duplicate that to STDOUT as well (ie same file output)
Ta
Ken Foskey
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
thinbrowser wrote:
also, try printing in a editor that captures ouput,
and also allows you to submit arguments just like on a command prompt.
Crimson Editor (windoz freeware) does that.
Let us know if anything you try .. works?
Thanks for all the great advice. I was able to track down the pro
On 2/12/06, Ron Smith <[EMAIL PROTECTED]> wrote:
snip
> Yeah, I deserve it. Giving the whole story in the beginning would have been
> better. But,
> hey I'm JAPH and laziness is a virtue in that case. :-) Anyway the "push"
> does just fine.
snip
There is a difference between laziness (a sin) and
Tom Phoenix <[EMAIL PROTECTED]> wrote: Inexplicably, Ron Smith seems to have
written:
> Yes, you are right. I probably should post the rest of the story at this
> point:
> and I'd like to generate a row of asterisks, based on the number stored in
> $firstBar. I thought of printing to a file th
Inexplicably, Ron Smith <[EMAIL PROTECTED]> seems to have written:
> Yes, you are right. I probably should post the rest of the story at this
> point:
> and I'd like to generate a row of asterisks, based on the number stored in
> $firstBar. I thought of printing to a file then splitting the co
Tom Phoenix <[EMAIL PROTECTED]> wrote: On 2/12/06, Ron Smith wrote:
> How would I redirect the output of the print line to an array instaed of
> STDOUT?
>
> my $firstBar = 5;
> print "*" while $firstBar, $firstBar--;
You would write some Perl code that puts s
Sky Blueshoes <[EMAIL PROTECTED]> wrote: Ron Smith wrote:
>Hi all,
>
> How would I redirect the output of the print line to an array instaed of
> STDOUT?
>
> my $firstBar = 5;
> print "*" while $firstBar, $firstBar--;
>
> I've looked in
On 2/12/06, Ron Smith <[EMAIL PROTECTED]> wrote:
> How would I redirect the output of the print line to an array instaed of
> STDOUT?
>
> my $firstBar = 5;
> print "*" while $firstBar, $firstBar--;
You would write some Perl code that puts something into an a
Hi all,
How would I redirect the output of the print line to an array instaed of
STDOUT?
my $firstBar = 5;
print "*" while $firstBar, $firstBar--;
I've looked in several places, including the Camel Book and the Cookbook.
Everything seems to be refering to a fil
I am trying to write a wrapper to invoke a script which takes input from
STDIN.
I am opening a filehandle so that I can store all information returned by
invoked script.
However, it hangs when second script is waiting for user input. Input
varies from time to time.
So, I can't use open(SCRIPT,
Manish Sapariya wrote:
> I use screen as my tool to deal with unstable network connection.
> Its command line version of vncviewer.
>
> Screen dameon allows me to reconnect the previously opened screen,
> if I by mistake detache or exit the current shell, or network forces
> my connection down.
H
ely
disconnected, and I'd still lose the output.
Is there a way or saying that every STDOUT, STDERR, die(), exit(), and any
error messages can be appended to a specified logfile, so I can maybe track
this bug? I've done a search on google for logging STDOUT and things, most
results of which g
ld, so this session may end up being prematurely
disconnected, and I'd still lose the output.
Is there a way or saying that every STDOUT, STDERR, die(), exit(), and
any
error messages can be appended to a specified logfile, so I can maybe
track
this bug? I've done a search on goo
> -Message d'origine-
> De : [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] De la part de zentara
> Envoyé : samedi 25 juin 2005 13:36
> À : beginners@perl.org
> Objet : Re: route STDOUT to file
>
>
> There are a whole bunch of different ways, ...
>
this session may end up being prematurely
disconnected, and I'd still lose the output.
Is there a way or saying that every STDOUT, STDERR, die(), exit(), and any
error messages can be appended to a specified logfile, so I can maybe track
this bug? I've done a search on google for logging STDOU
ere a way or saying that every STDOUT, STDERR, die(), exit(), and any
error messages can be appended to a specified logfile, so I can maybe track
this bug? I've done a search on google for logging STDOUT and things, most
results of which give me modules which I don't really understand how it
On May 18, Lance Murray said:
perl -i -p -e "s/oldhostname/newhostname/g" /etc/hosts
However, what is the syntax if I wanted to just process a text stream to
stdout?, e.g.:
cat /etc/hosts | perl "s/in_text/out_text/g"
Simple: use the -p and -e switches, but not the -i sw
1 - 100 of 289 matches
Mail list logo