Re:Win32::EventLog and Open issue

2001-09-26 Thread Jorge Goncalvez
HI, folks I am under NT and my problem is that my file cygwin_syslog.txt is always growing with the same informations that is boring.If I append with open(LOGFILE >...) the file is always destroyed and I have only one information and I want the whole logs informations I want to use open(LOGFILE

Re: printing out yesterdays date

2001-09-26 Thread Mel Matsuoka
At 12:45 PM 09/26/2001 +0530, Rahul Garg wrote: >is there any command in linux to get yesterdays date -mm/dd/yy > >or can a program be written for it in perl...any suggestions One way to do it is to get the time(), subtract 86400 from it, then feed the result to localtime(). Or you could just u

Re: Please solve the problem

2001-09-26 Thread Mel Matsuoka
At 07:14 AM 09/25/2001 -0700, parvatam jagannadh rao wrote: >Hi > > >I want to call a system command (linuxconf module >dnsconf) to pass parameters to console but i am unable >to do from a cgi program. if i execute from console >it is working fine. The reason why it wont work via CGI is because t

Re: Net::FTP module

2001-09-26 Thread walter valenti
If you use Debian Linux there's tha packege .deb, and you can install with dselect. Otherwise look for in CPAN. Walter Sofia wrote: > >From where can I download the Net::FTP module? > > Thanks in advance > > __ > Do You Yahoo!? >

Re:dynamic Progress bar

2001-09-26 Thread Jorge Goncalvez
Hi I would like to make a dynamic Progress bar which could grow up with the number of string ftpd received in a log file.Each square means that a ftpd arrived on the log file. How can I do this? My code is: open INFILE, "< $_Globals{SYSLOG}" or die "Cannot open $_Globals{SYSLOG} for reading:

RE: FW: rmdir

2001-09-26 Thread Porter, Chris
Please remove me from the mailing list. Thank you. Chris -Original Message- From: Michael Fowler [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 27, 2001 5:27 PM To: Me Cc: Porter, Chris; [EMAIL PROTECTED] Subject: Re: FW: rmdir On Wed, Jun 27, 2001 at 03:51:43PM -0500, Me wrote: >

Hash

2001-09-26 Thread walter valenti
Hi, There's a method for delete a element in a hash ??? (for example in a hash contains 10 elements after deleting a element, it shall contains 9 elements). Thanks Walter èb‹˜j(ër¢êß­ç²j(r‰šuÚ޲ƭ†ÛiÿùšŠ\š†Š¢

Re: separating an array into sets of n elements

2001-09-26 Thread birgit kellner
--On Dienstag, 25. September 2001 15:44 -0800 Michael Fowler <[EMAIL PROTECTED]> wrote: > It would? Your variables are off by one. Element 2 in @hitsarray is > 'the', not 'is'. $fieldnumber is set to 4, but you clearly have > groupings of 5 words: true; apologies for late night sloppiness.

Re: Hash

2001-09-26 Thread Brett W. McCoy
On Wed, 26 Sep 2001, walter valenti wrote: > There's a method for delete a element in a hash ??? > (for example in a hash contains 10 elements after deleting a element, it > shall contains 9 elements). Yes, it's called delete! :-) perldoc -f delete -- Brett

PPM Errors after update

2001-09-26 Thread Crowder, Rod
I am running Windows 98, a rebuild of my machine after total failure. I found discrepancies between the modules that I had installed and what was showing in the on line docs. In an attempt to tidy up my configuration in PPM I ran verify --upgrade This seems to have broken PPM. It is reporti

how to change the prompt in perl

2001-09-26 Thread kavitha malar
Is their any function is available

Re: RTF to HTML or text conversion

2001-09-26 Thread wallachd
Jonathan, Try AbiWord an open source cross-platform word processor: http://www.abiword.org/ Darlene Wallach Jos Boumans wrote: > > Jonathan Macpherson wrote: > > > > Hi; > > > > Im trying to write a perl script that will pull > > newspaper stories out of a sybase database and > > post them o

Re: how to change the prompt in perl

2001-09-26 Thread Morbus Iff
>Is their any function is available Are you talking about your shell prompt? If that's the case, then that's a capability of the shell itself, and you'd want to look into the appropriate docs (for example, there's a Bash Prompt HOWTO). Technically, yes, you could use Perl to edit the relevant

Problems with Referenzes

2001-09-26 Thread Ulle Siedentop
I try to understand references in perl. $try = "test"; # Scalar $try conains value test print $try; # prints test $try_ref = \$try; # Scalar $try_ref contains reference to $try print $try_ref; # prints SCALAR(0x1234567) print $$try_ref; # prints test Now I would like to do something simi

Re: Problems with Referenzes

2001-09-26 Thread Brett W. McCoy
On Wed, 26 Sep 2001, Ulle Siedentop wrote: > $try_ref = \$try; # Scalar $try_ref contains reference to > $try > print $try_ref; # prints SCALAR(0x1234567) > > print $$try_ref; # prints test Right... this last line is called 'dereferencing' -- getting the value referred to. > Now I would like

Re: Problems with Referenzes

2001-09-26 Thread Jeff 'japhy' Pinyan
On Sep 26, Ulle Siedentop said: > $try_ref = \%name; # Scalar $try_ref contains reference to >hash %name > print $try_ref; # prints HASH(0x7654321); > >Now I don't know how or I don't understand how to get any >key or value back from the reference $try_ref??? Read the 'perlref' documentation, an

Re: FW: rmdir

2001-09-26 Thread Scott P
>From the faq list: 1.2 - How do I unsubscribe? Now, why would you want to do that? Send mail to <[EMAIL PROTECTED]>, and wait for a response. Once you reply to the response, you'll be unsubscribed. If that doesn't work, find the email address which you are subscribed from and s

Re: Windows programming in Perl

2001-09-26 Thread Michael D. Risser
On Tuesday 25 September 2001 05:01 pm, Gary Luther wrote: > I have just had an interesting problem brought into me by the Director of > CIS (Computer Information Systems). > > From an existing windows program the idea is to do some auxillary > processing of data that is retrieved from an imaging s

Reusing same output line

2001-09-26 Thread Greg . Froese
Is it possible when writing to the console with print to continue using the same line rather than have each message appear after the previous one? Anyone is familiar with ncftp knows that the program shows the up/download status updating on the same line. I'm curious if the same thing is poss

Windows drive mapping in perl

2001-09-26 Thread Chris Garringer
Recently I had a problem where I had to loop through a set of shares (actually NetWare servers and volumes), map a drive, execute a program (that requires a drive mapping, UNC will not work), delete the drive mapping. I could not find a way to map/unmap a drive in Perl. I ended up calling a b

Date comparing and difference?

2001-09-26 Thread John Grimes
OK, this may seem rather simple, but I can't for the life of me find an answer... Let's say I've got two dates. The current date, and a date in the past. What's the scripting module that I'm going to need to compute the difference between the two dates? I've gone to perl.com, but nothing seems

Re: Problems with Referenzes

2001-09-26 Thread Jos I. Boumans
same way you did with teh scalar: dereference it: %$hash_reference; there's a tutorial on this at http://japh.nu hope that helps Jos - Original Message - From: "Ulle Siedentop" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, September 26, 2001 3:30 PM Subject: Problems w

RE: Date comparing and difference?

2001-09-26 Thread Ron Rohrssen
Date-Manip is a fantastic date manipulation module. It's quite a bit slower than date-calc but, it offers a lot more flexibility. Ron -Original Message- From: John Grimes [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 26, 2001 11:55 AM To: [EMAIL PROTECTED] Subject: Date comparing

Re: Date comparing and difference?

2001-09-26 Thread Jeff 'japhy' Pinyan
On Sep 26, John Grimes said: >Let's say I've got two dates. The current date, and a date in the past. >What's the scripting module that I'm going to need to compute the difference >between the two dates? I've gone to perl.com, but nothing seems quite >exactly what I'm looking for... I'm an adv

Re: Date comparing and difference?

2001-09-26 Thread Jeffl
John, Try Date::Simple very simple interface for calculations between two dates. use Date::Simple ('date', 'today'); # Difference in days between two dates: $diff = date('2001-08-27') - date('1977-10-05'); Jeffl On 2001.09.26 12:55 John Grimes wrote: > OK, this may seem rather

Looking for Info

2001-09-26 Thread Chris Rogers
Sorry to bother you guys with this completely unrelated subject but I have had no luck finding much needed information. Does anyone know of a good resource for RPC and NFS? I have been trying to mount to a remote filesystem but have had no luck. The information I found on linuxdoc.org was helpf

RE: Reusing same output line

2001-09-26 Thread Bob Showalter
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, September 26, 2001 12:05 PM > To: [EMAIL PROTECTED] > Subject: Reusing same output line > > > Is it possible when writing to the console with print to > continue using > the same line rather th

RE: Date comparing and difference?

2001-09-26 Thread Bob Showalter
> -Original Message- > From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, September 26, 2001 1:20 PM > To: John Grimes > Cc: [EMAIL PROTECTED] > Subject: Re: Date comparing and difference? > > ... > > I'm an advocate of using the STANDARD modules and a bit of > brain

RE: Date comparing and difference?

2001-09-26 Thread Jeff 'japhy' Pinyan
On Sep 26, Bob Showalter said: >> use Time::Local; # for the timelocal() function > >How is it that Date::Calc and Date::Manip aren't "standard" >modules? Because they aren't in the base distribution? Correct. -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/

RE: Date comparing and difference?

2001-09-26 Thread Bob Showalter
> -Original Message- > From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, September 26, 2001 2:39 PM > To: Bob Showalter > Cc: '[EMAIL PROTECTED]' > Subject: RE: Date comparing and difference? > > > On Sep 26, Bob Showalter said: > > >> use Time::Local; # for the

RE: Date comparing and difference?

2001-09-26 Thread Jeff 'japhy' Pinyan
On Sep 26, Bob Showalter said: >Is it your policy to eschew the use of such "non-standard" >modules? What do you do about DBI, say? There's nothing built-in that does what DBI does at anywhere near the speed, flexibility, and power. My date code works because it's built off a module that works

New Project, Design Thoughts appreciated

2001-09-26 Thread Derrick (Thrawn01)
I've been the task of designing a remote maintenance system, for several maybe hundreds ) of computers across a WAN. It would preferably be a web application so multiple users can operate the maintnce on several systems simultaneously. The problem I have is with running commands on the remote sy

Converting *nix file to dos

2001-09-26 Thread Kipp, James
Hi When I bring win32 files over to Unix I use 'tr/\015//' on the file to get rid of the hard return (^M). anyone know how to convert it back the other way? I tried some sed commands but none seems to work. Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [

RE: New Project, Design Thoughts appreciated

2001-09-26 Thread Bob Showalter
> -Original Message- > From: Derrick (Thrawn01) [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, September 26, 2001 3:52 PM > To: Perl Beginners > Subject: New Project, Design Thoughts appreciated > > > I've been the task of designing a remote maintenance system, > for several > maybe hun

RE: Converting *nix file to dos

2001-09-26 Thread Gibbs Tanton - tgibbs
Many unix systems have both a dos2unix and unix2dos command...you might try that. -Original Message- From: Kipp, James To: [EMAIL PROTECTED] Sent: 9/26/2001 2:54 PM Subject: Converting *nix file to dos Hi When I bring win32 files over to Unix I use 'tr/\015//' on the file to get rid of

Pad Number with Leading Zeros

2001-09-26 Thread Schoeneman, Carl
Hello. Is there a way to pad a number with leading zeros with 1 command rather than the 2 I used below? It looks like you're supposed to be able to zero-fill with sprintf but I couldn't figure it out. #!/bin/perl -wd $f = 1234; $g = sprintf "%6s", $f; $g =~ s/ /0/g;

RE: Pad Number with Leading Zeros

2001-09-26 Thread Wagner-David
Change %6s to %06s and it will pad with zeros. Wags ;) -Original Message- From: Schoeneman, Carl [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 26, 2001 12:40 To: Perl Beginners (E-mail) Subject: Pad Number with Leading Zeros Hello. Is there a way to pad a number with

Re: Converting *nix file to dos

2001-09-26 Thread Bill Jones
On 9/26/01 4:02 PM, "Gibbs Tanton - tgibbs" <[EMAIL PROTECTED]> wrote: > rid of the hard return (^M) Of course, the easiest NON-Perl way, would be to use VI or PICO to just save your current ^M char in a file for safe keeping - like when you need it again. It's what I do; But some say I'm cra

RE: Converting *nix file to dos

2001-09-26 Thread Kipp, James
I am looking for a way in Perl to do it without calling external commands. This will part of a larger program. the tr/\015// works great for dos2unix, but I can't get the unix2dos to work correclty. > -Original Message- > From: Gibbs Tanton - tgibbs [mailto:[EMAIL PROTECTED]] > Sent: Wed

RE: New Project, Design Thoughts appreciated

2001-09-26 Thread Lirot, Gregory
If one is in a Unix shop, this is very straightforward. Telnet would not be practical, that is for interactive connections. Something like the following could be called from the crawler. There are some security issues for you to think through here. !#/bin/perl $SCRIPT = "/home/joesmoe/somes

RE: Converting *nix file to dos

2001-09-26 Thread Robert Citek
Hello James, Here's a perl way that seems to work: perl -ne 's#\012#\015\012#g; print' filename Regards, - Robert -- At 03:02 PM 9/26/2001 -0500, Gibbs Tanton - tgibbs wrote: >Many unix systems have both a dos2unix and unix2dos command...you might try >that. > >-Original Message---

RE: Converting *nix file to dos

2001-09-26 Thread Kipp, James
SOrry I should have stated I was looking for a perl way, not involving calling external commands. Thanks > -Original Message- > From: Bill Jones [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, September 26, 2001 4:10 PM > To: Gibbs Tanton - tgibbs; 'Kipp, James '; '[EMAIL PROTECTED] ' > Su

Re: Pad Number with Leading Zeros

2001-09-26 Thread Brett W. McCoy
On Wed, 26 Sep 2001, Schoeneman, Carl wrote: > Is there a way to pad a number with leading zeros with 1 command rather than > the 2 I used below? It looks like you're supposed to be able to zero-fill > with sprintf but I couldn't figure it out. $x = 1234; printf "%06d\n", $x prints 001234 --

RE: Converting *nix file to dos

2001-09-26 Thread Kipp, James
Thanks Robert I will give that a shot > -Original Message- > From: Robert Citek [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, September 26, 2001 4:13 PM > To: 'Kipp, James ' > Cc: '[EMAIL PROTECTED] ' > Subject: RE: Converting *nix file to dos > > > > Hello James, > > Here's a perl wa

RE: Converting *nix file to dos

2001-09-26 Thread Kipp, James
It is part of a perl module I am writing in UNIX. one of the methods in the module converts any file to dos text, html, or unix text. Thanks > > > No problem, are you writing on Windows or Unix? > > Either way, the code will be retained in the script - so long > as you don't > edit it with

RE: New Project, Design Thoughts appreciated

2001-09-26 Thread Derrick (Thrawn01)
NO gui. Oh. sure I could telnet to all the remote systems, But that is what we are tring to avoid. I'd hate to telnet into 80+ systems just to preform a HD usage check. eh ? Thanks for the SSH thought I'll look into it. Also found a module File::Remote Looking into that. -Original Messa

RE: Converting *nix file to dos

2001-09-26 Thread Kipp, James
Thanks If anyone is interested, Robert's suggestion worked: $line =~ 's#\012#\015\012#g; Thanks so much Robert !!! > > one way (non perl) would be to get hd2u-0.7.1 from www.freshmeat.net > I am sure there is a perl way... > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comm

Re: New Project, Design Thoughts appreciated

2001-09-26 Thread Kevin Meltzer
Hi Derrick, I would consider using Net::SSH::Perl, or XML-RPC (RPC::XML). I've had to do similar things, and have been happy with XML-RPC. You can have it run as a server, however, with some trickery, you can also have it 'embedded' in another server or script. I haven't personally used Net::SSH:

Re: New Project, Design Thoughts appreciated

2001-09-26 Thread Peter Scott
At 03:51 PM 9/26/01 -0400, Derrick (Thrawn01) wrote: >I've been the task of designing a remote maintenance system, for several > maybe hundreds ) of computers across a WAN. >It would preferably be a web application so multiple users can operate the >maintnce on several systems simultaneously. > >

Re: Inserting into the middle of arrays

2001-09-26 Thread RoadRaat
In a message dated Mon, 24 Sep 2001 10:07:45 AM Eastern Daylight Time, "Pete Sergeant" <[EMAIL PROTECTED]> writes: > How do I insert $scalar into position $x of @array, where $x is smaller than > $#array? What about... #!/perl # Script: insert # Author: Nelson Fleet # Date: 09/26/2001

Capturing STDOUT of system launched process

2001-09-26 Thread Matthew Blacklow
I am writing a script at the moment which among others things creates another process using the system call. What I need to do is capture the screen output of this process into a string variable so that it can latter be manipulaterd. ie. capture the STDOUT. Any help, suggestions or sample code wo

Re: Capturing STDOUT of system launched process

2001-09-26 Thread Jeff 'japhy' Pinyan
On Sep 27, Matthew Blacklow said: >What I need to do is capture the screen output of this process into a string >variable so that it can latter be manipulaterd. ie. capture the STDOUT. Several options: # qx() and `` are the same $output = `prog arg1 arg2`; $output = qx(prog arg1 arg2);

very basic regexp question

2001-09-26 Thread claement claementson
Hello again, This is so basic I'm embarrassed to ask. Sorry. 1. I'm trying to pass a regexp in $bandNameRE through to a while loop, but it keeps bailing complaining about an "unrecognised escpape \S", but when I put the regexp directly into the condition it's happy. Why is this? 2. The other th

Re: Capturing STDOUT of system launched process

2001-09-26 Thread smoot
> "Jeff 'japhy' Pinyan" <[EMAIL PROTECTED]> said: > Of course, all of these should have error-checking: > > $x = `...` or die "can't run ...: $!"; > > open OUTPUT, "... |" or die "can't run ...: $!"; Don't forget to check the close for errors. If the pipe fails for some reason close retur

Cookie and redirecting.

2001-09-26 Thread Andrew
Dear Folks, I am currently working on cookies for tesing out. Although a lot of people had disabled the function on their browsers, I would just like to try it. I got few knotty problems : 1) I could set the cookie's parameters and retrieve it. But how I can make use of the returned

Re: very basic regexp question

2001-09-26 Thread Jeff 'japhy' Pinyan
On Sep 27, claement claementson said: >1. I'm trying to pass a regexp in $bandNameRE through to a while loop, but >it keeps bailing complaining about an "unrecognised escpape \S", but when I >put the regexp directly into the condition it's happy. Why is this? That's because you're using a doub

Re: very basic regexp question

2001-09-26 Thread claement claementson
Great stuff. Regexp objects rock. It worked perfectly and helped with some other things too. Thanks a lot Jeff. CC >From: Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: claement claementson <[EMAIL PROTECTED]> >CC: [EMAIL PROTECTED] >Subject: Re: very basic regexp que

Interesting TOP results

2001-09-26 Thread Daniel Falkenberg
Hi all, I have just created a perl script that daemonizes itself and runs as a process in the background (Hence daemon :) ). I just ran a TOP on my server and noticed that the perl script uses 8.8% memory. and about 1% CPU. Now the script continually runs through a while loop. Before I try it

Re: Inserting into the middle of arrays

2001-09-26 Thread Andrea Holstein
[EMAIL PROTECTED] wrote: > > What about... > > $old_pos = 1; > $new_pos = 1; > > while ($old_pos <= @old_array) { > if ($old_pos < $insert_pos) { > @new_array[$new_pos - 1] = @old_array[$old_pos - 1]; > $new_pos = $new_pos + 1; > } else { > @new_array[$new_pos - 1] = $insert_str

Unix time

2001-09-26 Thread Daniel Falkenberg
Hi all, Can some one please tell me how I would go about printing Unix time with Perl. I figured it would go something like this... $unixtime = localtime(); print $unixtime; Cheers, Daniel Falkenberg == VINTEK CONSULTING PTY LTD (ACN 088 825 209) Email: [EMAIL P