uot;);
exit;
} else {
waitpid($pid, 0);
}
}
I was wondering if this script is written correctly and if there's a way to
have the monitoring script release the shell and get the prompt back, or is it
running in the child process shell and that's why it's getting
--- On Mon, 3/16/09, Chas. Owens wrote:
> From: Chas. Owens
> Subject: Re: I'm trying to install 'Net::SSH::Perl' on a Windows Box.
> To: geeksatla...@yahoo.com
> Cc: "Perl"
> Date: Monday, March 16, 2009, 6:51 AM
> On Mon, Mar 16, 2009 at 03:51, Ron
--- On Sun, 3/15/09, Chas. Owens wrote:
> From: Chas. Owens
> Subject: Re: I'm trying to install 'Net::SSH::Perl' on a Windows Box.
> To: geeksatla...@yahoo.com
> Cc: "Perl"
> Date: Sunday, March 15, 2009, 5:46 AM
> On Sun, Mar 15, 2009 at 04:56,
" at
C:/strawberry/perl/site/lib/PPM.pm line 16
87."
The package did not install so I googled this response but didn't come up with
any clear-cut direction.
...any suggestions? I also ran accross the following while searching CPAN:
Net::SSH::W32Perl
MSWin32 compatibility
> From: Beau E. Cox
> Subject: Re: I'm sure this is a common question, but I can't find the
> solution.
> To: geeksatla...@yahoo.com
> Date: Saturday, March 14, 2009, 10:51 PM
> Ron,
>
> On Sat, Mar 14, 2009 at 7:28 PM, Ron Smith
> wrote:
> >
>
> Ron Smith wrote:
> > Hello all,
>
> Hello,
>
> > How do you print elements of an array, each on its own
> line, in a Windows' console?
> >
> > I'm doing the following:
> >
> > E:\My Documents>perl -e "use
> ExtUtils::I
returns:
Archive::TarArchive::ZipArray::CompareAutoLoaderCPANCPAN::ChecksumsCPAN::DistnameInfo
...etc.
I need:
Archive::Tar
Archive::Zip
Array::CompareAutoLoaderCPAN
CPAN::Checksums
CPAN::DistnameInfo ...etc.
I tried "\n", '\n' and a 'foreach' loop, but nothing I
if ($process) {
sleep 30} else {
exec (./) or print STDERR "couldn't exec :
$!";
}
}
Ron Smith
geeksatla...@yahoo.com
(213)300-9448
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
y hold down the keys indicated, at those
spots in the substitution.
Hope this helps.
Ron Smith
[EMAIL PROTECTED]
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com
t; response code and
> > response
> > time,etc. In the output file that I am getting I
> want the following line:
> >
> > print "\n" ;
> >
> > Any Suggestions??
> >
Would the following help?
perl -e 'print "\\n\n"'
Escap
--- Aaron Priven <[EMAIL PROTECTED]> wrote:
>
> On Sep 30, 2006, at 7:30 PM, Ron Smith wrote:
>
> > Hi all,
> >
> > I get the error: "Undefined subroutine
> &Main::BadData
> > called at line 42" when executing the following
> '.cgi
$thirdSide = $1;
if ($firstSide == $secondSide &&
$firstSide == $thirdSide) {
print p("That's an equilateral
triangle!\n");
} elsif ($firstSide == $secondSide ||
$firstSide == $thirdSide || $secondSide == $thirdSide)
{
od
> Programming Language
Try Learning Perl, Fourth Edition (Paperback) by
Randal L. Schwartz, Tom Phoenix, brian d foy. Here's
one of many links:
http://www.amazon.com/gp/product/0596101058/sr=8-2/qid=1147704150/ref=pd_bbs_2/103-0184362-2216600?%5Fencoding=UTF8
Ron Smith
>
> Thanks
&
>
> --
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> <http://learn.perl.org/>
> <http://learn.perl.org/first-response>
>
>
>
Can you send us code?
Ron Smith
[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
--- Chris Devers <[EMAIL PROTECTED]> wrote:
> On Thu, 9 Mar 2006, Ron Smith wrote:
>
> > How can I assure printing the correct order?
>
> You can't guarantee the order of keys in a hash per
> se. For efficiency
> and optimization, hashes are stored in a rand
t( p( "Trip: $i Gallons used: $_ Miles
driven: $values{ $_ } The miles per gallon for
this trip were: $average" ) );
}
print( p( "Total trips so far: $i Total
gallons so far: $totGals Total miles so far:
$totMilesDriven Total average so far:
$totAverage" ) );
print( end_html() );
>
> Sorry, my mistake, that should really be:
>
> my ( $smallestNum, $largestNum ) = ( sort { $a <=>
> $b } @numbers )[ 0, -1 ];
>
> Although as I said, the for loop is more efficient.
>
It just amazes me as to how *flexable* Perl is.
Ron Smith
[EMAIL PROTECTE
>
> Sorry, my mistake, that should really be:
>
> my ( $smallestNum, $largestNum ) = ( sort { $a <=>
> $b } @numbers )[ 0, -1 ];
>
> Although as I said, the for loop is more efficient.
>
I just amazes me as to how *flexable* Perl is.
Ron Smith
[EMAIL PROTECTE
--- "John W. Krahn" <[EMAIL PROTECTED]> wrote:
> Ron Smith wrote:
> Hans Meier (John Doe) wrote:
> >>
> >>The if-else could be shortened to (untested, so
> >>please check):
> >>
> >>die "Bla" unless
> >&
ing: my @sorted = sort { $a <=> $b } @numbers;
Thanks, again. [pg. 790 "Camel Book"] This was
overlooked in my haste.
>
> > my $sum = 0;
> > foreach ( @numbers ) {
> > $sum += $_;
> > }
> >
> > my $average = ( $sum / $total );
>
> You
; unless
> ($userIn)=$userIn=~/^\s*((?:\d+\s*?)+)\s*$/;
>
Right; a lot shorter. Why, the parentheses around
$userIn?
> > my @numbers = split( / /, $userIn );
>
> This only splits on a single space character.
>
> my @numbers = split /\s+/, $userIn;
>
> splits (e
bers is:
$sum
The average of all the numbers is:
$average
HTML
Ron Smith
[EMAIL PROTECTED]
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 though
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
Please, ignore this thread!! I've posted the correct thread under the subject:
Redirecting STDOUT to an array.
Ron Smith <[EMAIL PROTECTED]> wrote: Hi all,
How would I redirect the output of the print line to an array instaed of STDOUT?
my $firstBar = 5;
print "*" while
ehandle instead.
...any suggestions??
Ron Smith
[EMAIL PROTECTED]
ehandle instead.
...any suggestions??
Ron Smith
[EMAIL PROTECTED]
print<
This page takes two strings from the user and prints them in alphabetical
order. If they are equal, they will print on separate lines.
Enter your first string:
Enter your second string:
@list
Click here to go back
HTML
}
Ron Smith
[EMAIL PROTECTED]
John,
Thanks for the explanation. It's clarified things for me. I'll be searching
CPAN for a solution, as you suggested.
Thanks, again
Ron
John Doe <[EMAIL PROTECTED]> wrote:
> On 2/5/06, Ron Smith wrote:
> > Hi all,
> >
> > I've been
Yes, I'm trying to have the "blinking cursor" start in a specific text field,
on a web page, when the page loads in the browser.
Thanks,
Ron
Omega -1911 <[EMAIL PROTECTED]> wrote:
On 2/5/06, Ron Smith wrote:
>
> Hi all,
>
> I've been lookin
Hi all,
I've been looking for this all over, but can't seem to find a link. Is there
a Perl or PerlScript equivalent to the JavaScript or vbscript on-focus
function? If there is, could someone please, point me in the right direction.
Thanks,
Ron
Ron Smith
[EMAIL PROTECTED]
e a personal bias against the format of
> insert you have used,
>and it makes it utterly impossible to help debug
> your code because
>now a critical piece of data ( the output of a
> DESCRIBE products)
>is invisible to us.
>
>I always prefer the "INSERT INT
Hi all,
I'm getting an error when trying to do an INSERT statement to a MySQL database.
There's something I'm not understanding here. Can anyone point me in the right
direction? I also tried a "do" method, but got the same error. I know the
"param" function is loading the values from the form,
Hi all,
I'm back on the list with another upload problem that's a little baffling to
me. I'm using the following script to do multiple uploads. But, after the files
are uploaded, they have a file size of 0 KB. And, in the case of text files,
the contents of the files are missing. ...anyone fam
--- Chris Devers <[EMAIL PROTECTED]> wrote:
> On Mon, 11 Jul 2005, Ron Smith wrote:
>
> > Insecure dependency in open while running with -T
> switch at
> > C:/www/cgi-bin/upload_save.cgi line 42.
>
> What do you see on line 42?
>
> It seems to be in St
Hi all,
I'm back again with another question. And, thanks for your previous help. This
time I'm working my wat through the book "Writing CGI applications with Perl".
There's a tutorial that I've done that involves uploading a file and inserting
the file name and description in MySQL. Some of y
--- Chris Devers <[EMAIL PROTECTED]> wrote:
> On Wed, 6 Jul 2005, Ron Smith wrote:
>
> > I'm getting an error when I submit the following
> html form to a CGI
> > script.
>
> Let's focus on the script, not the HTML.
>
> Once you've verif
Hi all,
I'm getting an error when I submit the following html
form to a CGI script. I'm too inexperienced to spot
the error. So, I'm looking for help from the list.
I've already made the changes as suggested from the
error log, but I get the same error again. Does anyone
have any suggestions for m
Hi all,
I'm running:
'http://localhost/html/inputForm.html' which takes a first name and last name,
and submits them to 'http://localhost/cgi-bin/query_string.cgi
I get a the following error:
-snip-1---
Internal Server Error
The server en
Hi everyone,
My OS stats are:
Apache/2.0.52 (Win32) PHP/4.3.10 mod_perl/1.99_18 Perl/v5.8.6 Server at
localhost Port 80
This is running on "Win XP Pro". When I try to create a user-defined ENV
variable in 'httpd.conf', I'm unable to do a re-start of Apache. The server
just won't come back u
Jim Garvin <[EMAIL PROTECTED]> wrote:
Ron Smith wrote:
>Hmmm...,
>
>I'm attempting to build and install a perl module on a Win XP box using the
>free version of "Borland C++ Builder 6". I seem to have run into a snag. Here
>are the particulars:
>
in the DOS shell:
MAKE Version 5.2 Copyright (c) 1987, 2000 Borland
Can't find string terminator "@" anywhere before EOF at -e line 1.
Does anyone out there have any experience with this error message?
TIA
Ron Smith
I used 'perldoc -f switch' and nothing came up. I've done what you suggested
and I'm on my way. Thank you very much.
R
"Ing. Branislav Gerzo" <[EMAIL PROTECTED]> wrote:
Ron Smith [RS], on Saturday, June 11, 2005 at 14:11 (-0700 (PDT)) has
on mind:
RS>
Does Perl have the equivalent of a case statement or a switch statement. I'm
trying to avoid a bunch of "if-then" statements. I'm seeing posts regarding
"use switch", but I want to make sure it's not a deprecated practice. I'm using
Perl -v 5.8.0.
my $day;
if ($day = "mon") {
$num = 0;
}
Using the following input on a Window$ OS:
filename.0001.ext
filename.0002.ext
filename.0003.ext
filename.0004.ext
filename.0005.ext
And, the following script:
#!/usr/bin/perl -w
use strict;
print "\nThis program will change the file name(s) for
you.\n\n";
print "What's the current base name
I'm trying to rename some files from the command line but nothing gets changed.
I think I'm leaving out something; maybe '$_'. Or, I have incorrect syntax. I
don't get any error message either. I took a look at 'man rename', but it
doesn't show an example of a loop. I'm using the following on th
--- Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote:
> Ron Smith wrote:
> > If I wanted to add more fields to my output, which
> construct would I
> > use to create more fields; something like the
> following?
> >
> > basenamecountextensionsize
>
en things out?
Pardon the confusion.
Ron
Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote:
Ron Smith wrote:
> If I wanted to add more fields to my output, which construct would I
> use to create more fields; something like the following?
>
> basename count extension size
>
> .
Hey Gunnar, and list,
---snip
print "\n";
my %HoA;
for ( `dir /b/s` ) {
push @{ $HoA{$1} }, $2 if
/(.+)\\(\w+)\.\d+\.\w+$/;
}
for my $dir ( sort keys %HoA ) {
print join ( "\n", $dir ), "\n\n";
my @basenames = @{ $HoA{$d
7;perldoc perlreftut', but can't see
the last step.
--- Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote:
> [ replying to the list since that's where the
> discussion belongs ]
>
> Ron Smith wrote (to me privately):
> > Thank you *very* much for furthering my
jalmarsson <[EMAIL PROTECTED]> wrote:
> Ron Smith wrote:
>
>
>
> > I would like the output to be the following:
> >
> > C:\Perl\scripts\shots\sp2\shot_1 <--current
> directory
> > C:\Perl\scripts\shots\sp2\shot_1\sub_directory
>
The following is the script:
---snip
#!/usr/bin/perl -w
use strict;
use File::Basename;
my @lines = dirname `dir /b/s`; print "@lines\n";
---snip
The following is the input:
C:\Perl\scripts\shots\sp2\shot_1\dir.t
Here's the problem:
My input looks like the following:
C:\Perl\scripts\shots\sp2\shot_1\dir.txt
C:\Perl\scripts\shots\sp2\shot_1\drames.txt
C:\Perl\scripts\shots\sp2\shot_1\filename.0001.cin
C:\Perl\scripts\shots\sp2\shot_1\filename.0002.cin
C:\Perl\scripts\shots\sp2\shot_1\filename.0003.
Thanks all. The problem was at the begining of the 'TELNET' session, I have to type
in: UNSET CRLF.
-
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
ttypu)
Does that help?
Ron
Errin Larsen <[EMAIL PROTECTED]> wrote:
On Fri, 8 Oct 2004 11:11:26 -0700 (PDT), Ron Smith
wrote:
> I'm working the exercises out of the "Learning Perl" book, but I'm doing so through
> a shell account from a Window$ box into a UNIX env
I'm working the exercises out of the "Learning Perl" book, but I'm doing so through a
shell account from a Window$ box into a UNIX environment. I'm experiencing an oddity
wherein I'm getting, what I think are, extra newlines or carriage returns in my code
as I type it in the shell through a teln
stalled at all. Is there a way to use Perl on-line from such a machine? Is Perl
small enough to be installed on a floppy disk that can be moved from machine to
machine?
Is it possible to use 'Perl' without having to install it on a particular machine?
TIA
Ron Smith
You can find a compatible and free C compiler at 'http://www.borland.com/'.
As far as Perl itself is concerned, you can download ActivePerl from
'http://www.activestate.com'.
This Windows version of perl includes the 'Tk' module. If you use the MSI
version, you will also need the Windows 2.0 i
5 if (@ARGV) {
6 foreach $ARGV (@ARGV) {
7 opendir (DIR, "$ARGV") or die "$!";
8 }
9 }
So far, it looks like the last command-line argument is stepping on any other
arguments that come before it. Is there a way to assign multiple command-line
args t
5 if (@ARGV) {
6 foreach $ARGV (@ARGV) {
7 opendir (DIR, "$ARGV") or die "$!";
8 }
9 }
So far, it looks like the last command-line argument is stepping on any
other
arguments that come before it. Is there a way to assign multiple
command-line
args
How about:
next unless /\S/;
Ron
>From: Eric Wang <[EMAIL PROTECTED]>
>To: Pedro A Reche Gallardo <[EMAIL PROTECTED]>
>CC: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
>Subject: Re: DELETE BLANK LINE
>Date: Thu, 4 Oct 2001 11:05:59 -0700 (PDT)
>
>Yeah, I think you can use chomp();
>so use foreach $i
Thanks, everybody!! I've declared the $n variable outside the subroutine, as
suggested, and everything works fine :-).
Ron
>From: "Ron Smith" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Subroutine example
>Date: Mon, 10 Sep 2001 14:23:28 -0700
>
Is it just me, or does anyone out there notice that the example subroutine
on pg. 57 of "Learning Perl" (Third Edition) doesn't work, as presented?
When written like:
snip--
#!/usr/bin/perl -w
use strict;
sub marine {
my $n += 1; # Global variable $n
prin
What is it that you're trying to do with the file? If you just want to read
the contents, using 'filehandles' and 'strict', here's one way to do it:
---snip---
#!/usr/bin/perl -w
use strict;
open (FILE, "some_file");
while () {
print;
}
close FILE;
--
I don't know how detailed you wanna get with this, but the following will
return the line in the text file with the address.
-snip--
#!/usr/bin/perl -w
use strict;
while (<>) {
open (FILE, "some_file_name");
print if /@/;
}
close FILE;
-sn
t;Couldn't create \"sequence_tree.txt\" $!\n";
while () {
print DIALIGN if (/DIALIGN/ .. /FASTA/);
print FASTA if (/FASTA/ .. /Sequence tree/);
print TREE if (/Sequence tree/ .. eof);
}
close (DIALIGN);
close (FASTA);
close (TREE);
-snip
use: 'perl -MMODULE_NAME -e 1' for an individual module, like:
perl -MFile::Copy -e 1, or perl -MCGI -e 1.
For all the modules installed, you might want to check out the following
URL:
http:[EMAIL PROTECTED]/msg04057.html
Ron
>From: "Joe Bellifont" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
The following works for me:
--snip-
#!/usr/bin/perl -w
use strict;
my $winner = 1;
if ($winner == 1) {
print "$winner\n";
}
--snip-
The above yeilds: 1
If you wanted to print "winner", then remove the '$' from the "print"
statement ;-). Oh Yeah! ...
Is this for PC or UNIX??
The following basic works for UNIX:
print (`df -k`); # use backquotes
Chapter 14 (Process Management) in "Learning Perl".
Ron
>From: Vincent Bouttier-Deslandes <[EMAIL PROTECTED]>
>To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
>Subject: How to retrieve filesystem size ?
Hi all,
I've been handed a project where I have to read the contents of several
files, which looks like the following:
file.0001.rgb
file.0002.rgb
file.0003.rgb
file.0004.rgb
file.0005.rgb
file_2.0001.rgb
file_2.0002.rgb
file_2.0003.rgb
then replace the contents of those files with the same in
Could someone provide a snippet of code that reads the contents of an array
to a text file.
Thanks,
Ron
_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
Fo
Go with "Learning Perl by: Randal L. Schwartz & Tom Christiansen". But, as
in my case, even that was a little advanced. So, another book I would
recommend, if needed, would be "Perl A Beginner's Guide by: R. Allen Wyke &
Donald B. Thomas".
Also another book that's full of goodies is: "Masterin
I seem to be stuck on a relatively simple problem, but being a newbie I
can't seem to see the STDERR of my ways.
To make a short story shorter, the attached bit of code is meant to allow
multple users on a networked UNIX enviroment to select which machine they
want to create a directory on, bu
If it's not "CGI.pm you're looking for, try "Term::ANSIColor" module.
Ron
>From: viswanathan sundararajan <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Highlihting a string
>Date: Thu, 19 Jul 2001 23:14:03 -0700 (PDT)
>
>Hi,
> I want to highlight a string in my output.For
>example consi
You can find a suitable 'perl' binary to install on your system at
'activestate.com'. Also, I've found the following two books a great deal of
help:
Perl A Beginner's Guide
R. Allen Wyke & Donald B. Thomas
Published by: Osborne
Learning Perl
by: Randal L. Schwartz & Tom Christiansen
Published
76 matches
Mail list logo