why post a python solution here?
On Thu, Oct 25, 2018 at 8:58 AM Asad wrote:
> Hi ,
>
> Yes i have the code :
>
> import re
> import datetime
> from datetime import timedelta
>
> Header = "*"
>
> f3 = open ( r"D:\QI\logA.txt", 'r' )
> string =
I cannot emphasize enough how fragile the perhaps obvious regex based
comparisons of timestamps can be. I second the approach demonstrated by
Илья Рассадин above. There are subtle and difficult to debug problems
buried in timestamps. Not least of which is locale ambiguity,
discontinuities like da
You have to make sure that the cron job has the right path. Usually it can
be as easy as calling a wrapper script that sets up the correct environment.
On Thu, Dec 7, 2017 at 1:38 PM, SSC_perl wrote:
> After moving to a VPS, I'm finally able to use perlbrew to use the
> latest perl, but
I have a utility I use to wrap logging lines and make them easier to look
at. It has different features than you want but down in the core might be
a few clues of some use.
Without options it generates output like the below:
$ wrap /var/log/mail.log
Aug 23 10:39:52 crf postfix/pickup[12668]:
first you want to be sure that your host can connect to the remote host onn
the right port. You can use the telnet command to do that
telnet server port
where server is the name for the server in your /etc/hosts file and port
is the port number on the remote where sybase is listening.
iirc
I like to define a value subroutine.
sub myvalue {
return uc($options{$_[0]}->{type} // "")
}
This particular one returns the empty string ("") if
$options{$_[0]}->{type} is undefined.
Now the sort becomes:
sort {myvalue($a) cmp myvalue($b)} keys %options
This code is unteste
sing Perl PoD to comment out code ? Thats why i wanted
> help decrypting that.
>
> Thanks
>
> On Thu, Mar 30, 2017 at 8:41 AM, Chris Fedde wrote:
>
>> Ahamedee1.
>>
>> The little aphorism "It's always the middle of the story" is just a
>> reminder
Three pieces of advice:
One: Remember the Kübler-Ross model: denial, anger, bargaining, depression,
acceptance.
Two: SQL is going to be a part of Information technology for a long time.
Three: It's always the middle of the story.
chris
On Fri, Mar 24, 2017 at 1:17 AM, Sami Joseph wrote:
>
> Hi
About as close as you can get is via the Expect module. It provides ways to
interact with interactive programs.
https://metacpan.org/pod/Expect
There are other ways. One way is to use the POE module. But that is a much
more complex approach.
By the way, in my opinion this is not OT. :-)
chris
Other comments on this question discuss elevating user permissions via
suid, sudo the setuid bit and so on.
There are good reasons to need to create files with owner/group that are
different from your own, they usually come up in system administration
situations. Most common situation where access
Luca,
I think you have a reasonable solution to the problem as you present it.
Adding a couple strategic comments might help the clarity. A concern for
me is how the $condition variable gets set.
If the source data dictates the $condition then deriving them both in the
same parser might help:
perate perl
> scripts,
> which means I can simply tidy up and utilise existing proof-of-concept
> scripts that I've already started collecting together (e.g. LED blinker)
>
> Just as an aside, when did this list get so quiet? I can't believe how few
> posts there have be
It might not be too bad an idea to just use processes rather than getting
wrapped up in event loops and asynch IO.
Forking is cheap and fast in linux. In my opinion it gets overlooked for
many cases where it is a perfectly acceptable approach.
There are lots of approaches to work queues. The mai
Here is one approach using a perl repl.
re.pl
$ my @x = qw(3 1 4 2 9 0)
$VAR1 = 3;
$VAR2 = 1;
$VAR3 = 4;
$VAR4 = 2;
$VAR5 = 9;
$VAR6 = 0;
$ grep {$_ == 4} @x and 'true'
grep {$_ == 10} @x and 'true' or 'false'
On Thu, Aug 18, 2016 at 7:35 PM, wrote:
> Hello,
>
> What's the better way to decide
Kenneth,
Below the cut is my example implementation as I understand your
requirements.
Note that the "compare" routine uses $a and $b which are "special" to perl
sort routines.
Also the compare routine is written for obviousness rather than for brevity
or elegance.
The return from compare illustr
15 matches
Mail list logo