How to make a process wait for sometime

2001-07-10 Thread Suresh Babu.A [Support]
Hi, I am using a FTP session in my perl script and i want to update the time taken by the process. But i feel that there may be problem with the code. thanks for any help you can provide... Code -- > == $sd=`date +%m/%d/%Y`; $st=`date +%H:%M:%S`; print FTP "b

Re: Hi, what time() ^ $$ means?

2001-07-10 Thread Walt Mankowski
On Wed, Jul 11, 2001 at 12:34:37AM -0400, Walt Mankowski wrote: > On Tue, Jul 10, 2001 at 07:27:04PM -0700, Erik W wrote: > > $$<<15 ??? > > This shifts the value of $$ 15 bits to the left, which is the same as > multiplying $$ by 2**15. I forgot to reference the code you were referring to: >>

Re: Hi, what time() ^ $$ means?

2001-07-10 Thread Walt Mankowski
On Tue, Jul 10, 2001 at 07:27:04PM -0700, Erik W wrote: > Thanks a lot, then what << means? >From perldoc perlop... Binary "<<" returns the value of its left argument shifted left by the number of bits specified by the right argument. Arguments should be integers. (See also

CGI-PERL

2001-07-10 Thread Rahul Garg
Hello, Well ,I am a beginner to PERL friends. I think we can create HTML sort of pages thru perl scripting.Thats what is called CGI-PERL programming and can carry out various operations on say click events. (But how ?can u give me some simple examples.) Tell me if I am correct/not correct. Can u

Re: Hi, what time() ^ $$ means?

2001-07-10 Thread Walt Mankowski
On Tue, Jul 10, 2001 at 09:56:55PM -0400, Jeff 'japhy' Pinyan wrote: > Just so you know, you don't need to call srand() in modern versions of > Perl. Unless, of course, you want to seed the random number generator to a specific value. :-) Walt

Re: Hi, what time() ^ $$ means?

2001-07-10 Thread matthschulz
Am Dienstag, 10. Juli 2001 21:27 schrieb Erik W: > --- "Stephen P. Potter" <[EMAIL PROTECTED]> > > wrote: > > Lightning flashed, thunder crashed and Erik W > > > > <[EMAIL PROTECTED]> whispered: > > | time() ^ $$ > > | > > | What ^ and $$ mean here? > > | > > | ^ bit xor? > > | $$ logic and? >

Re: Code review

2001-07-10 Thread Rogério Brito
On Jul 10 2001, Blader Robert G DLVA wrote: > Just a suggestion - Would it be possible/practical to compile a > summary of some of the suggestions that you receive? I would also be interested in that, as I'm just learning perl myself (I have not yet finished the 2nd chapter of

Re: Re-inventing wheels (WAS re: Required Fields Module)

2001-07-10 Thread Michael Fowler
On Tue, Jul 10, 2001 at 09:46:27PM -0400, Morbus Iff wrote: > I think the only other one I had regarding the param() sort of interface > was the fact that I had to assign the value of a param to an interim value > (is that right?). So instead of: > >print "The color is $form->{foo}";#

Re: timer/display-DISPLAY WORKING;THANKS

2001-07-10 Thread Rogério Brito
On Jul 09 2001, [EMAIL PROTECTED] wrote: > while (1) { > print $chars[$i++], "\r"; > select(undef, undef, undef, PAUSE); > } The index of the array/list should be ($i++)%@chars instead, so that it does not get out of bounds. []s, Roger... -- =-=-=-=

Re: Re-inventing wheels (WAS re: Required Fields Module)

2001-07-10 Thread Akshay Arora
yes CGI.pm is smart. But if you want better performance, make sure mod_perl is installed. It will cache all the compiled Perl code for you. as for the code below. It looks correct. If you wish to make it one line, you could just use the concat operator print "The color is " . para

Re: Re-inventing wheels (WAS re: Required Fields Module)

2001-07-10 Thread Akshay Arora
I personally favour HTML::Embperl and HTML::EmbperlObject (part of the former). easily installed through CPAN and into Apache for you if you want. Or you can explicitly call it from a CGI page or command line or another perl script. Morbus Iff wrote: > > >> >CGI.pm isn't the only solution to cr

Re: split log file

2001-07-10 Thread Akshay Arora
for using split, try to remove the ( ) since you will not be needing $1 through $9. I suspect because you have many ( ) in there, this might cause a problem. I also gather that you are trying not to really split, but to pattern match, in which case you can only have from $1-$9 (i belive that is co

Re: Hi, what time() ^ $$ means?

2001-07-10 Thread Erik W
--- "Stephen P. Potter" <[EMAIL PROTECTED]> wrote: > Lightning flashed, thunder crashed and Erik W > <[EMAIL PROTECTED]> whispered: > | time() ^ $$ > | > | What ^ and $$ mean here? > | > | ^ bit xor? > | $$ logic and? > > $$ is a special variable that is the process ID of > the currently ru

Re: Help: Searching an array question++

2001-07-10 Thread Stephen P. Potter
Lightning flashed, thunder crashed and "Bob Bondi" <[EMAIL PROTECTED]> w hispered: | Yep, another newbie at Perl. I have come to a wall. What I need to do is | open a file, find a value in the file and substitute a value. | I've gotten to the point of what to do with an open file. I have been tryi

Re: Hi, what time() ^ $$ means?

2001-07-10 Thread Stephen P. Potter
Lightning flashed, thunder crashed and Erik W <[EMAIL PROTECTED]> whispered: | time() ^ $$ | | What ^ and $$ mean here? | | ^ bit xor? | $$ logic and? $$ is a special variable that is the process ID of the currently running process. So, this is returning the bitwise xor of the return of tim

Re: Hi, what time() ^ $$ means?

2001-07-10 Thread Jeff 'japhy' Pinyan
On Jul 10, Erik W said: >when I read the book, I saw they generate and seed by >using Just so you know, you don't need to call srand() in modern versions of Perl. >^ bit xor? Yes. >$$ logic and? Nope, that'd be &&. $$ is the process ID (or PID) variable. Check 'perlvar'. -- Jeff "ja

multi element array question

2001-07-10 Thread Piet
Okay so I'm really new to perl but I've hacked together this program to parse /etc/passwd and email the login's manager every month. Well it does just that but now I need to add some widget that will email the manager once with a list of all his personnel rather than one email per user in the pas

Re: Re-inventing wheels (WAS re: Required Fields Module)

2001-07-10 Thread Morbus Iff
>use CGI ":all"; >@values = param('foo'); > >If you're using the object interface, you've read the wrong book. >Even Lincoln himself doesn't use that for any examples I've seen him >teach in seminars. "perldoc CGI" is written that way mostly from >legacy, not optimization. Hmmm.

Re: multiprocessors and perl

2001-07-10 Thread SunDog
Hi Bob, Of course you want to multi-thread ... My recommendation ... Java loves threads and ... interfaces well with PERL. You don't have to re-invent the wheel, use Java to manage the multithreading and invoke your Perl Scripts. This goes a long way to supporting reuse a

Re: Re-inventing wheels (WAS re: Required Fields Module)

2001-07-10 Thread Brett W. McCoy
On Tue, 10 Jul 2001, Morbus Iff wrote: > >Text::Template is installable as a regular module and is cross-platform. > > Hmm... My reasoning for saying it wasn't was because CPAN says it failed > the Win32 build. Have you used it before? Anything to say concerning memory > usage? It's small enough

Hi, what time() ^ $$ means?

2001-07-10 Thread Erik W
Hi gurus, I have a dumb question, when I read the book, I saw they generate and seed by using time() ^ $$ What ^ and $$ mean here? ^ bit xor? $$ logic and? Thanks in advance! __ Do You Yahoo!? Get personalized email addresses from Yahoo!

Re: Re-inventing wheels (WAS re: Required Fields Module)

2001-07-10 Thread Morbus Iff
>> >CGI.pm isn't the only solution to creating dynamic web pages with Perl. >> >Text::Template is another alternative, as are embedded Perl >> >implementations like Apache::ASP, Mason, or even PerlScript (for IIS). >> >> None of which is crossplatform (Windows / Mac / Linux) >> or installable by a

Re: Re-inventing wheels (WAS re: Required Fields Module)

2001-07-10 Thread Brett W. McCoy
> >CGI.pm isn't the only solution to creating dynamic web pages with Perl. > >Text::Template is another alternative, as are embedded Perl > >implementations like Apache::ASP, Mason, or even PerlScript (for IIS). > > None of which is crossplatform (Windows / Mac / Linux) > or installable by a user

split log file

2001-07-10 Thread Katie Elliott
Hi, I am trying to split apart a log file. However, it doesn't seem to be working. Can anyone give me some help? I am still trying to figure out how split works. It seems to work up to the browser, but after that I seem to be having trouble. Thanks in advance, Katie --- ipaddr -

Visualizing of data (Diagram)

2001-07-10 Thread matthschulz
Is there a modul out there which makes diagrams which can be actualized? I want to use it for displaying data from a multimeter and a AD-Modul. Thanks Matth

Re: OT: Need Help with chmod and unix permissions - NEVER MIND!

2001-07-10 Thread ehughes
Sorry folks, I found the relevant section in my manual. I should have looked harder. Sorry to trouble you with an OT subject. Elton = NOVA 505 W. Olive Ave. Suite 550 Elton Hughes (I

OT: Need Help with chmod and unix permissions

2001-07-10 Thread ehughes
Hello All, This is OFF-TOPIC! It has nothing to do with Perl, unless someone has a Perl solution that is. If you are not into Unix and sysadmin stuff, please delete this and go on. I need help in coming up with a chmod command that will end up like this: -r-sr-xr-t I need to set the sticky bit

Re: Multi-Threading?!?

2001-07-10 Thread Jos I. Boumans
Depending on what you need and what kind of scripts we're tlaking you might want to concider using POE, that's perls object environment.. it's not true multi-threading, but it's timeslicing (multi threading is still experimental and not too reliable i'm afraid - might change from 5.8 up wards). A

Re: "the right way"

2001-07-10 Thread Paul
--- Matija Papec <[EMAIL PROTECTED]> wrote: > Btw, when we talk about structures is there something like switch in > perl which could replace following code? > > $x==1 and $y = 1; > $x==2 and $y = 2; > $x==3 and $y = 3; I mentioned Damian Conway's Switch.pm earlier today: use Switch; my $x

A IPC::Shareable query

2001-07-10 Thread Vidyut Chavan
Hi All, I am using Perl and Perl/Tk to develop a small software installer. I will be starting one perl script from another. The calling program has the User interface with TK, and one of the widgets is a progressbar. This bar must get updated based on the value of a variable. Now, in the program

Re: FTP perl script

2001-07-10 Thread Peter Scott
At 06:14 PM 7/10/01 +0200, Jean-Pascal Dezalay wrote: >I wrote a perl script to make a FTP connection to a remote machine like this > ># >#!/usr/local/bin/perl >open (FTP, " | ftp -v -n remote.comp.fr"); >print FTP, "user username pas

Re: Perl-case statement, and module syntax error

2001-07-10 Thread Chas Owens
Damian Conway has written a module that simulates a switch for Perl. http://search.cpan.org/doc/DCONWAY/Switch-2.03/Switch.pm";> SYNOPSIS use Switch; switch ($val) { case 1 { print "number 1" } case "a"{ print "string a" } case [1..10,42] { print "number

use of the word "cookie"

2001-07-10 Thread Grossner, Tim X. (AIT)
Is there some special function within perl that would dissallow the work "cookie" from being used? I am using a script written to connect to a group of Cisco routers and am not able to get perl to login using the "cookie" as the password. If I change the pass on the router to something else, say "

Re: Multi-Threading?!?

2001-07-10 Thread Paul Johnson
On Tue, Jul 10, 2001 at 07:21:43PM +1000, Michael Lambert wrote: > Hi all, > > I'm fairly new to this list, so I'm not sure if this is really the right > place to ask a question of this nature, but I shall ask anyway in the hope > that it is. Seems fine to me. > I am trying to write a small scr

Re: "the right way"

2001-07-10 Thread Peter Scott
At 11:01 PM 7/10/01 +0200, Matija Papec wrote: >Btw, when we talk about structures is there something like switch in perl >which could replace following code? > >$x==1 and $y = 1; >$x==2 and $y = 2; >$x==3 and $y = 3; There are at least 22 ways of doing it (according to a Tom Christiansen FMTYEW

FTP perl script

2001-07-10 Thread Jean-Pascal Dezalay
I wrote a perl script to make a FTP connection to a remote machine like this # #!/usr/local/bin/perl open (FTP, " | ftp -v -n remote.comp.fr"); print FTP, "user username passwd\n"; print FTP, "bin\n"; print FTP, "prompt\n"; print FTP

Re: "the right way"

2001-07-10 Thread Michael Fowler
On Tue, Jul 10, 2001 at 11:01:51PM +0200, Matija Papec wrote: > Btw, when we talk about structures is there something like switch in perl > which could replace following code? > > $x==1 and $y = 1; > $x==2 and $y = 2; > $x==3 and $y = 3; You don't need switch to replace this code: $y = $x;

Multi-Threading?!?

2001-07-10 Thread Michael Lambert
Hi all, I'm fairly new to this list, so I'm not sure if this is really the right place to ask a question of this nature, but I shall ask anyway in the hope that it is. I am trying to write a small script that will run a variable number of other scripts at the same time. I believe this will requ

Re: "the right way"

2001-07-10 Thread Matija Papec
Paul <[EMAIL PROTECTED]> wrote: >When it matters is when the visual appearance of your script is notably >altered. Sometimes the postfix is neater -- personally, I don't like >opening and closing a block on the same line in an if, but that's just >me... and I *do* do it when I have a conditional e

Re: "the right way"

2001-07-10 Thread Matija Papec
Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> wrote: > # a flip-flop > $x = 1; > $x = !$x; # now $x is '' (which can be treated like 0) > $x = !$x; # now $x is 1 > > # another flip-flop > $x = 1; > $x = 1 - $x; # now $x is 0 > $x = 1 - $x; # now $x is 1 > >Those are the typical flip-flops I'

Re: creating new config file based on array

2001-07-10 Thread Jeff 'japhy' Pinyan
On Jul 10, Messervy, Joe M said: >#!/usr/bin/perl -w > >use File::Copy; > >opendir MYDIR, "." or die "egad!: $!"; >@allfiles = grep !/^\.\.?$/, readdir MYDIR; >closedir MYDIR; > >foreach $allfiles (@allfiles) { >copy("config", "config.$allfiles"); >eval "s//mydirectorystucture/log//mydirectorystu

creating new config file based on array

2001-07-10 Thread Messervy, Joe M
Hello, I have several files in a directory, and I need to create a config file for each one of them. I already have a standard config file, but it must be modified for each of the files in the directory (hope this makes sense). Here is what I have: #!/usr/bin/perl -w use File::Copy; opendir

multiprocessors and perl

2001-07-10 Thread Bob Mangold
I'm about to upgrade to a dual processor sunblade 1000 at work (absolute overkill), but before doing so I'm trying to figure out what I'm going to have to do to exploit both processors. - Do I need to install perl with any special options? - Will I need to start writing my scripts differently to

Re: glob-copying vs. dup'ing

2001-07-10 Thread Michael Fowler
On Tue, Jul 10, 2001 at 12:32:16PM -0700, Paul wrote: > > --- Michael Fowler <[EMAIL PROTECTED]> wrote: > > On Tue, Jul 10, 2001 at 10:19:43AM -0700, Paul wrote: > > >open THIS, ">&THAT" > > > > This dups (see man 2 dup) fileno(THAT) and opens it with the > > filehandle THIS. The THIS and T

Re: (solution) Re: STDIN and STDOUT

2001-07-10 Thread Paul
--- Michael Fowler <[EMAIL PROTECTED]> wrote: > On Tue, Jul 10, 2001 at 10:28:14AM -0700, Paul wrote: > > > > --- Paul <[EMAIL PROTECTED]> wrote: > > > > > > --- Bob Mangold <[EMAIL PROTECTED]> wrote: > > > > exec(' myperl.pl 2>&1 ' ) ? > > > > > > > > ok, this works, but what the heck is it do

Re: glob-copying vs. dup'ing

2001-07-10 Thread Paul
--- Michael Fowler <[EMAIL PROTECTED]> wrote: > On Tue, Jul 10, 2001 at 10:19:43AM -0700, Paul wrote: > >open THIS, ">&THAT" > > This dups (see man 2 dup) fileno(THAT) and opens it with the > filehandle THIS. The THIS and THAT filehandles now refer to the same > file descriptor, and thus th

RE: Code review

2001-07-10 Thread Yacketta, Ronald
will do... > -Original Message- > From: Blader Robert G DLVA [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 10, 2001 15:23 > To: 'Yacketta, Ronald' > Cc: Beginners (E-mail) > Subject: RE: Code review > > > Just a suggestion - Would it be possible/practical to compile > a summary of >

RE: Code review

2001-07-10 Thread Blader Robert G DLVA
Just a suggestion - Would it be possible/practical to compile a summary of some of the suggestions that you receive? Rob Blader Information System Assurance Office, CD2S Naval Surface Warfare Center (540)653-7270 [EMAIL PROTECTED] > -Original Message- > From: Yacketta, Ronald [mailto

FW: FW: Running out of memory

2001-07-10 Thread Blader Robert G DLVA
Thanks to everyone that responded. Adding a "my" before the line that did the split and stored the result in an array - @fw_logs = split(/;/, $LINE); seemed to make all the difference. I'm not certain I understand why - if anyone can shed light on that I'd appreciate it. for that ma

Re: (solution) Re: STDIN and STDOUT

2001-07-10 Thread Michael Fowler
On Tue, Jul 10, 2001 at 10:28:14AM -0700, Paul wrote: > > --- Paul <[EMAIL PROTECTED]> wrote: > > > > --- Bob Mangold <[EMAIL PROTECTED]> wrote: > > > exec(' myperl.pl 2>&1 ' ) ? > > > > > > ok, this works, but what the heck is it doing. i've never seen that > > > syntax. > > > > lol -- it's no

Re: glob-copying vs. dup'ing

2001-07-10 Thread Michael Fowler
On Tue, Jul 10, 2001 at 10:19:43AM -0700, Paul wrote: >open THIS, ">&THAT" This dups (see man 2 dup) fileno(THAT) and opens it with the filehandle THIS. The THIS and THAT filehandles now refer to the same file descriptor, and thus the same underlying file. >*THIS = *THAT This aliases

Re: Running out of memory

2001-07-10 Thread Michael Fowler
On Tue, Jul 10, 2001 at 01:35:05PM +0100, John Edwards wrote: > open ( FWLOG, "./logfile.010626"); > > while() { # Reads one line at a time into memory > ... > } > > @data = ; # Reads the whole file into memory > > You are replicating the second case, by reading the file a line at a time, > the

Re: FW: Running out of memory

2001-07-10 Thread Michael Fowler
On Tue, Jul 10, 2001 at 07:18:22AM -0400, Blader Robert G DLVA wrote: > open ( FWLOG, "./logfile.010626"); > > while ( $LINE = ) { > > chomp ($LINE); > @fw_log = split (/;/, $LINE); > > } If this is the only code you're using that has the problem you describe, and you didn't

Re: Perl-case statement, and module syntax error

2001-07-10 Thread Paul
--- Michael Fowler <[EMAIL PROTECTED]> wrote: > On Tue, Jul 10, 2001 at 09:43:26AM -0400, Sparkle Williams wrote: > > I'm having two problems > > 1) Is there an equivalent of the case function in Perl? > > perldoc -q switch, or Check out Damian Conway's Switch module. http://search.cpan.org/doc

RE: Code review

2001-07-10 Thread Yacketta, Ronald
> Code review is fine by me, however, I think the reviewers should > probably send to you privatley. > > Casey West I will ensure that I note that on the page

Re: Perl-case statement, and module syntax error

2001-07-10 Thread Michael Fowler
On Tue, Jul 10, 2001 at 09:43:26AM -0400, Sparkle Williams wrote: > I'm having two problems > 1) Is there an equivalent of the case function in Perl? perldoc -q switch, or http://www.perldoc.com/perl5.6/pod/perlfaq7.html#How%20do%20I%20create%20a%20switch%20or%20case%20statement%3f > $ftp = Ne

Re: passing arguments

2001-07-10 Thread Paul
--- "P. Schaub" <[EMAIL PROTECTED]> wrote: > I am calling a perl script within another perl script. Have you looked into require() and do()? > What is the best way to pass arguments to the second one ? Depends on what you want, what it does, and how it's written. > Is it possible to pass arra

Re: Directories

2001-07-10 Thread Michael Fowler
On Tue, Jul 10, 2001 at 09:02:21AM -0400, Craig Moynes/Markham/IBM wrote: > I am having some difficulty understanding your question. > If you just want to modify this script so that it does not die if the > directory contains files change the following: > > [snip] > >if ((-d $Name) and ($Name

Re: Code review

2001-07-10 Thread Casey West
On Tue, Jul 10, 2001 at 01:41:15PM -0400, Yacketta, Ronald wrote: : Folks, : : I would like to have some code I am currently working on reviewed by some of : the more experienced : Perl users on this list. If this is ok, please let me know and I will : provide an URL : to the script in an effort

Re: passing arguments

2001-07-10 Thread Chas Owens
On 10 Jul 2001 20:24:45 +0200, P. Schaub wrote: > Hi List, > > I am calling a perl script within another perl script. > What is the best way to pass arguments to the second one ? > Is it possible to pass arrays and hashs (or at least refs) ? > So far I am calling the second script like > @result=

passing arguments

2001-07-10 Thread P. Schaub
Hi List, I am calling a perl script within another perl script. What is the best way to pass arguments to the second one ? Is it possible to pass arrays and hashs (or at least refs) ? So far I am calling the second script like @result=`script2.pl $arg1 $arg2 $arg3` but I guess this is quite ugly.

Code review

2001-07-10 Thread Yacketta, Ronald
Folks, I would like to have some code I am currently working on reviewed by some of the more experienced Perl users on this list. If this is ok, please let me know and I will provide an URL to the script in an effort to keep list spam to a minimum Regards, Ron

Re: (solution) Re: STDIN and STDOUT

2001-07-10 Thread Paul
--- Paul <[EMAIL PROTECTED]> wrote: > > --- Bob Mangold <[EMAIL PROTECTED]> wrote: > > As mentioned eariler... > > > > --- Craig Moynes/Markham/IBM <[EMAIL PROTECTED]> wrote: > > You mentioned in the earlier email that you were calling your perl > > script > > via 'exec' (as I remember). > > Co

Re: (solution) Re: STDIN and STDOUT

2001-07-10 Thread Paul
--- Bob Mangold <[EMAIL PROTECTED]> wrote: > As mentioned eariler... > > --- Craig Moynes/Markham/IBM <[EMAIL PROTECTED]> wrote: > You mentioned in the earlier email that you were calling your perl > script > via 'exec' (as I remember). > Could you not use something like > exec(' myperl.pl 2>&1

How to start with Perl :)

2001-07-10 Thread David van-der-Geer - Sun Holland - ENS_PSC - System Analyst
Hello, Here is a very stupid question. It is related to Perl so I hope I may ask. Whenever I try to action a perl-script out of an HTML submition I only get to see plain text. So Apache is not recognizing the .pl or .cgi extension. Can anyone tell me what I should put in the httpd.conf-file ?

(solution) Re: STDIN and STDOUT

2001-07-10 Thread Bob Mangold
As mentioned eariler... --- Craig Moynes/Markham/IBM <[EMAIL PROTECTED]> wrote: You mentioned in the earlier email that you were calling your perl script via 'exec' (as I remember). Could you not use something like exec(' myperl.pl 2>&1 ' ) ? ok, this works, but what the heck is it doing. i've

glob-copying vs. dup'ing

2001-07-10 Thread Paul
Okay, we recently had a discussion of open THIS, ">&THAT" and *THIS = *THAT Doesn anybody know the difference? Especially if you use STDERR and STDOUT instead of THIS and THAT? Just trying to understand the underlying behavior. = And on a seperate note, if Perl6 isn't going to u

Having a difficult time with uninitialized values...

2001-07-10 Thread Craig S Monroe
I wanted to start out by saying thanks to all who have helped me in the past... I am having difficulty with the uninitialized value errors... I tested the following on its own: #! d:\perl\bin -w ### # # Author: Craig Monroe

Re: STDIN and STDOUT

2001-07-10 Thread Paul
--- Bob Mangold <[EMAIL PROTECTED]> wrote: > > Are you sure it's STDERR? Some write directly to ther terminal > > screen... > > I checked through the module code and it definitely says 'print > STDERR ...'. Well, unless they've done some shinanigans further up the code, that's pretty conclusive

Re: STDIN and STDOUT

2001-07-10 Thread Bob Mangold
> Are you sure it's STDERR? Some write directly to ther terminal > screen... > I checked through the module code and it definitely says 'print STDERR ...'. > What is this module? The module is 'bioperl' (used for genetic analysis). __ Do You Ya

RE: Shared memory

2001-07-10 Thread Rolf Banting
I'm an idiot. Although I am writing for example 10 1 1 3 3 277 1 1 3 3 277 1 1 3 3 277 ... etc into the memory segment as ints from my C-prog I was expecting perl's shmread to automagically convert this int data into a string. The answer is to use 'unpack' For instance : $num_recs = unpack "i"

Re: A simple question

2001-07-10 Thread Craig Moynes/Markham/IBM
From: Jie Meng <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 10, 2001 5:02 PM Subject: A simple question > > Dear all, > > I plan to write a simple remote connection script, and then "ls" the content > > of the current directory, input like > > telnet hostname > > username > >

Re: Help: Searching an array question++

2001-07-10 Thread Aaron Craig
At 08:32 10.07.2001 -0700, Bob Bondi wrote: >Yep, another newbie at Perl. I have come to a wall. What I need to do is >open a file, find a value in the file and substitute a value. >I've gotten to the point of what to do with an open file. I have been trying >the @array = statement. >I then wante

Re: A simple question

2001-07-10 Thread M.W. Koskamp
- Original Message - From: Jie Meng <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 10, 2001 5:02 PM Subject: A simple question Dear all, I plan to write a simple remote connection script, and then "ls" the content of the current directory, input like telnet hostname u

Help: Searching an array question++

2001-07-10 Thread Bob Bondi
Yep, another newbie at Perl. I have come to a wall. What I need to do is open a file, find a value in the file and substitute a value. I've gotten to the point of what to do with an open file. I have been trying the @array = statement. I then wanted to verify the contents of the array and tried p

Re: perl / php question

2001-07-10 Thread M.W. Koskamp
- Original Message - From: Bob Mangold <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, July 09, 2001 7:43 PM Subject: perl / php question > Hello, > > I'm not sure if anyone here can help me with this, but at least some direction > in where to to look would be great. > > I'm u

Shared memory

2001-07-10 Thread Rolf Banting
A question on shared memory on Solaris 2.6. The scenario is that I want to share data between a C-prog and a perl prog. I can create a segment fine from perl using either the shmget or IPC::ShareLite methods and a test C-prog is happily writing data to the segment. Likewise I can get another C-p

Re: A simple question

2001-07-10 Thread Luke Bakken
Use rsh or ssh - system "rsh -l $username $hostname ls"; for the above to wrk without a password, your client machine's hostname must be in $username's .rhosts file. Better yet, use ssh with RSA or DSA authentication - then you won't be exposing your password in plaintext. There's also a Net::

Re: STDIN and STDOUT

2001-07-10 Thread Paul
--- Bob Mangold <[EMAIL PROTECTED]> wrote: > > Does anybody know why he shouldn't do the following? > > > > *STDERR = *STDOUT; > > > > This is what I orignally tried, and is didn't really work. I think my > problem lies in the fact that I am hoping to make the change in a > module that I am 'u

Re: STDIN and STDOUT

2001-07-10 Thread Bob Mangold
> Does anybody know why he shouldn't do the following? > > *STDERR = *STDOUT; > This is what I orignally tried, and is didn't really work. I think my problem lies in the fact that I am hoping to make the change in a module that I am 'use'ing. So I tried all of the suggestions, but it seemed tha

Re: A simple question

2001-07-10 Thread Craig S Monroe
Jie, I am not an expert, but since participating in this wonderful list, it has been inferred that one should shy away from system commands when perl actually has modules that are designed for the desired goal. I would check out IO::Socket or Net::Telnet. Craig [EMAIL PROTECTED] Pager Numeric: 1

Re: Perl-case statement, and module syntax error

2001-07-10 Thread Jason Purdy
Just got the answer to #1 for you: check out 'switch' - documented in the 'perlsyn' perldoc. There is no 'case' or 'switch' function, but you can emulate it with a block & exit routine, as documented. Jason - Original Message - From: "Sparkle Williams" <[EMAIL PROTECTED]> To: <[EMAIL PR

A simple question

2001-07-10 Thread Jie Meng
Dear all, I plan to write a simple remote connection script, and then "ls" the content of the current directory, input like telnet hostname username password ls I use the following script: system ("telnet hostname"); = "username\n"; = "password\n"; system ("ls"); It failed in the syntax.

Re: STDIN and STDOUT

2001-07-10 Thread Paul
--- Bob Mangold <[EMAIL PROTECTED]> wrote: > Hello, > > I sent an email yesterday, but never heard anything. Maybe it was the > word 'php' in the subject, but let me just simplify and ask another > way. > > Is there a way to automatically direct all STDERR output to STDOUT. A > module I have in

Re: timer/display

2001-07-10 Thread Jos I. Boumans
quick glance tells me you should be using $i iinstead of $_ - Original Message - From: "Tyler Longren" <[EMAIL PROTECTED]> To: "Chas Owens" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, July 10, 2001 4:11 PM Subject: Re: timer/display > I have tried that. Here's the error I g

Re: STDIN and STDOUT

2001-07-10 Thread Chas Owens
On 10 Jul 2001 04:45:56 -0700, Bob Mangold wrote: > Hello, > > I sent an email yesterday, but never heard anything. Maybe it was the word > 'php' in the subject, but let me just simplify and ask another way. > > Is there a way to automatically direct all STDERR output to STDOUT. A module I > hav

Re:Perl $ GetVersion

2001-07-10 Thread Jorge Goncalvez
Hi Jos, in my %ENV there isn't my OS I tested it. I tried this sub restart_serv { my $OS = Win32::API::GetVersion(); $dwVersion = GetVersion(); if(!$dwVersion < 0x8000) # windows 98 not windows NT #for (sort keys %ENV) { prin

Re: timer/display

2001-07-10 Thread Tyler Longren
this for loop works: for(my $i=0; $i <= 1; $i++) { print "$windmill[$i % 4]\r"; usleep(5); } I changed the $_ to $i... Tyler - Original Message - From: "Jeff 'japhy' Pinyan" <[EMAIL PROTECTED]> To: "Tyler Longren" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent

Re: timer/display

2001-07-10 Thread Tyler Longren
I have tried that. Here's the error I get from that: Use of uninitialized value in modulus (%) at ./test.pl line 7. Tyler - Original Message - From: "Chas Owens" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 10, 2001 9:19 AM Subject: Re: timer/display > Try > > print

Re: timer/display

2001-07-10 Thread Jeff 'japhy' Pinyan
On Jul 10, Tyler Longren said: >#!/usr/bin/perl -w >use strict; >$| = 1; >use Time::HiRes qw(usleep); >my @windmill=("\\", "|", "/", "-"); >for(my $i=0; $i <= 1; $i++) { >print "$windmill[$_ & 3]\r"; >usleep(5); >} > >I get this error: >Use of uninitialized value in bitwis

RE: \r

2001-07-10 Thread Paul
--- Govinderjit Dhinsa <[EMAIL PROTECTED]> wrote: > I have a input file which is a fixed line file (all along one line, > no " \n or \r "). > ## > Q. How would I separate each data type, to do the following; > > At @fields

Re: timer/display

2001-07-10 Thread Chas Owens
Try print "$windmill[$_ % 4]\r" instead. On 10 Jul 2001 09:04:18 -0500, Tyler Longren wrote: > I've been playing with this spinning wheel thing. I've read through this > thread: > > > I don't know why this doesn't work: > >

Re: timer/display

2001-07-10 Thread Tyler Longren
I've been playing with this spinning wheel thing. I've read through this thread: I don't know why this doesn't work: #!/usr/bin/perl -w use strict; $| = 1; use Time::HiRes qw(usleep); my @windmill=("\\", "|", "/", "-"); for(my $

RE: Some body help!

2001-07-10 Thread Govinderjit Dhinsa
> I have a input file which is a fixed line file (all along one line, no " > \n or \r "). > ## > Q. How would I separate each data type, to do the following; > > At @fields 490, insert \r (carriage return). > > So I want the input file, to look l

Perl-case statement, and module syntax error

2001-07-10 Thread Sparkle Williams
I'm having two problems 1) Is there an equivalent of the case function in Perl? 2)I'm also getting a syntax error for the following part of my program that I'm attempting to run on my Unix system. I get a syntax error message for 'new($url, ', 'login($username, 'cwd($ftp_home), ', and 'get($fil

Re: Perl & Getversion

2001-07-10 Thread Jos I. Boumans
in your %ENV should be the information of what OS you run try this statement: for (sort keys %ENV) { print "$_ is $ENV{$_}\n" } for my win2k machine it says: OS is Windows_NT if you're looking for the perlversion it's stored in the $] variable... hth, Jos Boumans > Hi, there is an equivalen

Re: Directories

2001-07-10 Thread Craig Moynes/Markham/IBM
> Calling perl gurus, > Hello, help please!!! Looking to delete empty directories, I have a script > for that but if the directories have files in them, it dies. Either can I > add some type of script to delete them also or can I just avoid them all > together and just delete the empty ones. A

SMTP - outgoing email - Now Working

2001-07-10 Thread Stewart Watkiss
Thanks to everyone that replied to my question. I have now got this working using the Mail::Sendmail module. I was aware of this module, but I had misunderstood how it worked. I thought that it needed sendmail (the UNIX mail daemon) to be running locally (it's default setting), however I now kno

Re: STDIN and STDOUT

2001-07-10 Thread Craig Moynes/Markham/IBM
>Hello, >I sent an email yesterday, but never heard anything. Maybe it was the word >'php' in the subject, but let me just simplify and ask another way. >Is there a way to automatically direct all STDERR output to STDOUT. A module I >have installed automatically creates STDERR output, but I want t

Re: REGEX[2]

2001-07-10 Thread Robert Aspinall
Try it this way.. see the code below. open ISCD,"; #This gets ISCD closed and safely out of harms way. close (ISCD); open NEW,">.pl"; foreach $line (@temparray){ chomp $line; @fields = split //, $line; printf NEW '%1.1s' x 44, @fields[0..33,290..299]; } close NEW; ex

  1   2   >