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
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
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
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!?
>
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:
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:
>
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
èbj(ër¢êßç²j(ruÚÞ²ÆÛiÿù\¢
--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.
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
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
Is their any function is available
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
>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
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
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
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
>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
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
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
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
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
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
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
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
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
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
> -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
> -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
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/
> -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
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
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
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: [
> -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
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
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;
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
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
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
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
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---
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
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
--
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
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
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
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
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:
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.
>
>
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
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
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);
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
> "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
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
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
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
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
[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
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
60 matches
Mail list logo