I need to login on remote machine which is windows , and i think windows
doesent support ssh login unless ssh server installed.
Either i have to use VNC , remote desktop shairing etc.
I need to automate this using script.
Please help.
Regards
Irfan.
_
From: Blue Band
Tom Phoenix schrieb:
On 10/18/06, Chris Share [EMAIL PROTECTED] wrote:
I've got a question about $| = 1;
If I add $| = 1; at the top of the program this fixes the problem and
the program runs as expected.
Normally, output is buffered for efficiency; instead of writing each
I'm not even sure the title is the appropriate terminology. What I am
trying to do is fork a process that receives data from the parent, but,
once the data is received, the parent can go on and do whatever it wants
(and likewise the child). How do I arrange for the child process to be
detached
I'm not even sure the title is the appropriate terminology. What I am
trying to do is fork a process that receives data from the parent, but,
once the data is received, the parent can go on and do whatever it wants
(and likewise the child). How do I arrange for the child process to be
detached
On 10/19/2006 01:11 AM, Sayed, Irfan (Irfan) wrote:
I need to login on remote machine which is windows , and i think windows
doesent support ssh login unless ssh server installed.
Either i have to use VNC , remote desktop shairing etc.
I need to automate this using script.
Please help.
Hi all!
Maybe this has been answered before, but my searching didn't show up
anything: The Perl Book says: Auto increment and decrement work as in C.
So if I take this C program:
#include stdio.h
#include stddef.h
int main() {
int a;
int b;
a=3;
b=(++a)+(a++);
I have created a small program which will open notepad
and write something to it
.. infinitely . The
program will die if somebody closes the window . To cut
jokes with my friends I want to
To: beginners@perl.org
Date sent: Thu, 19 Oct 2006 13:55:45 +0200
From: Norbert Preining [EMAIL PROTECTED]
Copies to: Elisa Mori [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject:Evaluation of ++ different in C and perl?
-- Andreas Puerzer [EMAIL PROTECTED] wrote:
Tom Phoenix schrieb:
On 10/18/06, Chris Share [EMAIL PROTECTED]
wrote:
I've got a question about $| = 1;
If I add $| = 1; at the top of the program this
fixes the problem and
the program runs as expected.
Normally,
--- Derek B. Smith [EMAIL PROTECTED]
wrote:
-- Andreas Puerzer [EMAIL PROTECTED] wrote:
Tom Phoenix schrieb:
On 10/18/06, Chris Share [EMAIL PROTECTED]
wrote:
I've got a question about $| = 1;
If I add $| = 1; at the top of the program this
fixes the
Norbert Preining schreef:
The Perl Book says: Auto increment and decrement work as in
C. So if I take this C program:
#include stdio.h
#include stddef.h
int main() {
int a;
int b;
a=3;
b=(++a)+(a++);
printf(b=%d\n,b);
}
it prints b=8.
Thanks to all who responded.
The Suffering from Buffering? article explains everything.
Cheers,
Chris
Derek B. Smith wrote:
--- Derek B. Smith [EMAIL PROTECTED]
wrote:
-- Andreas Puerzer [EMAIL PROTECTED] wrote:
Tom Phoenix schrieb:
On 10/18/06, Chris Share [EMAIL PROTECTED]
--- Dr.Ruud [EMAIL PROTECTED] wrote:
Norbert Preining schreef:
The Perl Book says: Auto increment and decrement
work as in
C. So if I take this C program:
#include stdio.h
#include stddef.h
int main() {
int a;
int b;
a=3;
b=(++a)+(a++);
Rob Dixon schreef:
$uniq{$_} = 1 foreach @holdArr;
I prefer foreach to for, mainly because it is shorter.
Alternative:
@[EMAIL PROTECTED] = (1) x @holdArr;
Test-1:
perl -MData::Dumper -wle'
@keys = qw(a b c) ;
@hash{ @keys } = (1) x @keys ;
print Dumper \%hash
'
$VAR1 = {
I am currently building the IF statement like:
if ($project_name eq 'Proj1' || $project_name eq '' $task_name eq '')
That works but I was wondering if I can do this:
if ($project_name eq ('Proj1' || '') $task_name eq '')
Less typing... : )
Robert
--
To unsubscribe, e-mail: [EMAIL
Robert Hicks wrote:
I am currently building the IF statement like:
if ($project_name eq 'Proj1' || $project_name eq '' $task_name eq '')
That works but I was wondering if I can do this:
if ($project_name eq ('Proj1' || '') $task_name eq '')
Less typing... : )
No. Because ('Proj1' ||
Derek B. Smith wrote:
--- Dr.Ruud [EMAIL PROTECTED] wrote:
Norbert Preining schreef:
The Perl Book says: Auto increment and decrement
work as in
C. So if I take this C program:
#include stdio.h
#include stddef.h
int main() {
int a;
int b;
a=3;
Dr.Ruud wrote:
$ perl -wle '
$a = 3;
$b = 0 + (++$a) + ($a++);
print b=$b\n;
'
b=8
:)
Nup, this is not the solution:
$a = 3;
$b = 0;
$b = 0 + (++$a) + ($a++);
$c = 3;
$d = 0;
$d = (++$c) + ($c++);
print b=$b\n;
print d=$d\n;
prints:
b=8
d=9
Don't tell me that in perl
0 +
On 10/12/06, Paul [EMAIL PROTECTED] wrote:
On Wed, October 11, 2006 7:03 am, Mazhar wrote:
Dear All,
My Code is to ping a range of IP reading from a text file and if they
are
not reachable then just write the IP's to a file. Regarding permissions
i
am running the same script using root
--- Rob Dixon [EMAIL PROTECTED] wrote:
Derek B. Smith wrote:
--- Dr.Ruud [EMAIL PROTECTED] wrote:
Norbert Preining schreef:
The Perl Book says: Auto increment and decrement
work as in
C. So if I take this C program:
#include stdio.h
#include stddef.h
int main() {
On 10/19/06, Robert Hicks [EMAIL PROTECTED] wrote:
I am currently building the IF statement like:
if ($project_name eq 'Proj1' || $project_name eq '' $task_name eq '')
Because logical-and is higher precedence than logical-or, that
condition is the same as this:
$project_name eq 'Proj1'
On 10/19/06, Norbert Preining [EMAIL PROTECTED] wrote:
$b = (++$a) + ($a++);
I'm not sure whether C does so, but I believe that Perl does NOT
promise that auto-increments will be executed in the expected
left-to-right order. Thus, if a single expression includes more than
one auto-increment
Tom writes:
I'm not sure whether C does so, but I believe that Perl does NOT
promise that auto-increments will be executed in the expected
left-to-right order. Thus, if a single expression includes more than
one auto-increment working on the same variable, generally you can't
be sure what
On Thu, 2006-10-19 at 15:20 +0200, Jenda Krynicky wrote:
To: beginners@perl.org
Date sent:Thu, 19 Oct 2006 13:55:45 +0200
From: Norbert Preining [EMAIL PROTECTED]
Copies to:Elisa Mori [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject:
On 10/19/06, Norbert Preining [EMAIL PROTECTED] wrote:
BUT: Even if we consider *both* ways of evaluation the expression tree,
we arrive at 8:
There's more than both ways to do it.
I suspect that this is a result of an optimization that assumes that
no variable will appear at in multiple
On 10/19/06, Rob Dixon [EMAIL PROTECTED] wrote:
so the final values of $a and $b are the same regardless and Perl is definitely
doing something wrongly in the single-line version.
I would argue that the programmer did something wrongly by abusing the
auto-increment. But don't let that stop
-Original Message-
From: Jeff Pang [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 19, 2006 2:10 AM
To: Helliwell, Kim; beginners@perl.org
Subject: Re: Non-blocking child process
Hello,
I changed your codes like below:
use strict;
for (my $i=0;$i2;++$i) {
my
Hi Tom!
On Don, 19 Okt 2006, Tom Phoenix wrote:
$b = (++$a) + ($a++);
I'm not sure whether C does so, but I believe that Perl does NOT
No, also C does not guarantee any predescribed order. It depends on the
compiler.
BUT: Even if we consider *both* ways of evaluation the expression tree,
we
Did this come up in a real-world situation, or were you specifically
seeking to test the limits of Perl? In other words, what problem, if
any, are you trying to solve?
Teaching Perl to students, and to get them to understand the difference
between pre and post increment.
So, I guess
On 10/19/06, Helliwell, Kim [EMAIL PROTECTED] wrote:
I would like the parent to continue independently of the child.
It sounds as if you want to use the double-fork trick. The first fork
produces a child process; this child forks a grandchild process, then
quits. The grandchild process does
On Thu, Oct 19, 2006 at 09:56:58AM -0700, Tom Phoenix wrote:
On 10/19/06, Rob Dixon [EMAIL PROTECTED] wrote:
so the final values of $a and $b are the same regardless and Perl is
definitely doing something wrongly in the single-line version.
I would argue that the programmer did something
Jeff Pang schreef:
for (my $i=0;$i2;++$i) {
Alternative:
for my $i (0 .. 1) {
my $pid = open CHILD,|-;
One should always check the return value of open().
select CHILD;$|++;select STDOUT;
Alternative:
select((select(CHILD),$|=1)[0]);
(from perldoc -q flush)
--
I tried both, and they typically do work for me, but right now they just
aren't...
QQQ line1
line2
line3
...
lineX QQQ
any ideas?
Ryan
On 10/19/06, Helliwell, Kim [EMAIL PROTECTED] wrote:
Another way:
foreach $line (IN)
{
...
}
if you don't want to slurp all the lines into an array
From: Gerald Host [EMAIL PROTECTED]
I'm trying to read a text file line-by-line.
open IN, shift;
my @lines=split(\n,IN);
Did you ever read the docs???
my @lines=IN;
The operator returns the list of lines in the file if called in
the list
A Divendres 20 Octubre 2006 00:34, Gerald Host va escriure:
I'm trying to read a text file line-by-line.
open IN, shift;
my @lines=split(\n,IN);
foreach my $line (@lines) {
print OUT QQQ $line QQQ\n;
Hello,
I need to install a perl module, Crypt::SSLeay, for a client in their local
folder, /home/username
it's been quiet some time since I've installed a module in this manner, to use
to using either cpan or direct root installs. What is the correct procedure to
installing modules in this
On 10/19/06, Mike Blezien [EMAIL PROTECTED] wrote:
I need to install a perl module, Crypt::SSLeay, for a client in their local
folder, /home/username
it's been quiet some time since I've installed a module in this manner, to use
to using either cpan or direct root installs. What is the correct
Prefect! :)
thx's
Mike
- Original Message -
From: Tom Phoenix [EMAIL PROTECTED]
To: Mike Blezien [EMAIL PROTECTED]
Cc: Perl List beginners@perl.org
Sent: Thursday, October 19, 2006 9:42 PM
Subject: Re: non-root module install
On 10/19/06, Mike Blezien [EMAIL PROTECTED] wrote:
I
38 matches
Mail list logo