Re: How to compare timestamp in two different files(regex)

2018-10-25 Thread Chris Fedde
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 =

Re: How to compare timestamp in two different files(regex)

2018-10-24 Thread Chris Fedde
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

Re: Regex for date

2018-08-25 Thread Chris Charley
"Asad" wrote in message news:cag3lskh4dphjg18c-jxmo8bcqfd+vix5tep1ytsp4_6pd6z...@mail.gmail.com... Hi All , I need a regex to match the date : Sat Aug 25 08:41:03 2018 and covert into a format :'%m/%d/%Y %H:%M:%S' Thanks, -- Asad Hasan +91 9582111698 Hello Asad, You

Re: perlbrew and cron

2017-12-07 Thread Chris Fedde
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

Re: How to use Text::Wrap correctly

2017-08-23 Thread Chris Fedde
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

Re: DBI and hosts file entries

2017-06-01 Thread Chris Fedde
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

Re: Warnings when sorting by hashref

2017-04-11 Thread Chris Fedde
} keys %options This code is untested but maybe you see the idea. chris On Tue, Apr 11, 2017 at 7:13 AM, Mike Martin <m...@redtux.org.uk> wrote: > Hi > > I have the following code as an example against a hash of hashes, to sort > by hashrf key > > foreach my $opt (sort {uc($options

Re: Using PerlPod creatively

2017-03-30 Thread Chris Fedde
? Thats why i wanted > help decrypting that. > > Thanks > > On Thu, Mar 30, 2017 at 8:41 AM, Chris Fedde <ch...@fedde.us> wrote: > >> Ahamedee1. >> >> The little aphorism "It's always the middle of the story" is just a >> remi

Re: Using PerlPod creatively

2017-03-27 Thread Chris Fedde
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 <sami.

Re: [OT] app (ncurses?) mechanizer?

2017-03-27 Thread Chris Fedde
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

Re: How to get a called perl script to write output to a file with DIFFERENT user:group than the calling app?

2017-01-16 Thread Chris Fedde
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

Re: suggestion for print format string based on configuration

2017-01-03 Thread Chris Fedde
much a minor issue. BTW you are right to avoid formats. chris On Tue, Jan 3, 2017 at 2:35 AM, Luca Ferrari <fluca1...@infinito.it> wrote: > Hi all, > I've a program that needs to print some fields formatted in different > ways according to some conditions. > The solution I

Re: event driven daemon

2017-01-02 Thread Chris Fedde
Sorry for the late reply. I was enjoying some non computer time between the holidays. Good to see that your project is making progress. It seems to me that you have chosen a reasonable implementation scheme. I'll be interested to hear how it works out. chris On Thu, Dec 22, 2016 at 9:44 AM

Re: event driven daemon

2016-11-23 Thread Chris Fedde
. The main architectural approach is how close the coupling needs to be between the requester and the worker. One of my favorite, simple approaches is to put files into a directory. Each file represents a tasks and perhaps contains interesting metadata. chris On Wed, Nov 23, 2016 at 7:36 AM, Gary

Re: calculate within a loop

2016-09-21 Thread Chris Charley
""Chris Charley"" <char...@pulsenet.com> wrote in message news:20160912202839.22177.qm...@lists-nntp.develooper.com... "Nathalie Conte" <nco...@ebi.ac.uk> wrote in message news:9d0654e0-8ec0-4051-87ca-541f90931...@ebi.ac.uk... Dear all, Thanks a

Re: calculate within a loop

2016-09-14 Thread Chris Charley
""Chris Charley"" <char...@pulsenet.com> wrote in message news:20160912202839.22177.qm...@lists-nntp.develooper.com... "Nathalie Conte" <nco...@ebi.ac.uk> wrote in message news:9d0654e0-8ec0-4051-87ca-541f90931...@ebi.ac.uk... Dear all, [snip] man

Re: calculate within a loop

2016-09-12 Thread Chris Charley
"Nathalie Conte" wrote in message news:9d0654e0-8ec0-4051-87ca-541f90931...@ebi.ac.uk... Dear all, Thanks a lot for the codes various people which all work perfectly!! I have also discover some useful functions (eval and state) which can also be very helpful for this kind

Re: if element exists in an array

2016-08-18 Thread Chris Fedde
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

Re: IPv4/IPv6 parsing

2016-07-14 Thread Chris Knipe
ecking the amount of "." vs. the amount of ":" characters I guess. IPv4 = 3 dots + 1 colon, whilst IPv6 = at least two colons and one dot. Once you know whether you're dealing with IPv4 or IPv4, a simple split() would be enough to cut the port... The question is more towards determining reliably what you're working with. -- Chris.

IPv4/IPv6 parsing

2016-07-14 Thread Chris Knipe
uess, but them regex'es ain't one of my strong points. -- Regards, Chris Knipe

Re: having trouble understanding the built-in Perl sort with regards to mixed numbers and strings

2016-06-20 Thread Chris Fedde
return from compare illustrates Shalomi Fish's point about using the "||" operator to compose sort fields. Descending numeric order is done by reversing the comparison on that sub field. chris - cut - #!/usr/env/bin perl use strict; use warnings; my @x = ; sub compare { my @

Cache::*

2016-02-18 Thread Chris Knipe
$Cache->get($Data); if ($Response && $Response ne "") { $ClientConnection->send($Response); $Cache->remove($Data); $Processed=1; } } until ($Processed==1 || time() - $TimeStamp >= 2); } } } } } -- Regards, Chris Knipe

Re: Regex to match "bad" characters in a parameter

2016-01-26 Thread Chris Charley
"SSC_perl" wrote in message news:ef7499af-b4a5-4b07-8c69-3192ef782...@surfshopcart.com... On Jan 25, 2016, at 4:59 PM, Shawn H Corey wrote: Use the negative match operator !~ if( $QUERY_STRING !~ m{ itemid = [-0-9A-Za-z_]+? (?: \& | \z ) }msx ){ print "bad: $QUERY_STRING\n"; }

RE: reading from socket

2015-09-17 Thread Chris Knipe
hanging the data is some way or form... The above code really is simple, there's no changing of data there -- Chris. -Original Message- From: Brandon McCaig [mailto:bamcc...@gmail.com] Sent: Wednesday, August 12, 2015 8:00 PM To: Chris Knipe <sav...@savage.za.org> Cc: begi

RE: reading from socket

2015-09-17 Thread Chris Knipe
iginal Message- From: Chris Knipe [mailto:sav...@savage.za.org] Sent: Thursday, September 17, 2015 10:56 PM To: 'beginners@perl.org' <beginners@perl.org> Subject: RE: reading from socket Hi All, I'm SERIOUSLY starting to cry here :-( It's been over a month since I started this thre

Re: reading from socket

2015-09-17 Thread Chris Knipe
> > > Hello Chris. > > Can you provide the yenc files? > Both the good one and the bad one? > http://expirebox.com/download/f7ebd6e37cf576e29df89bb6ae78ded4.html - Includes the two original files (text document, and binary image) - Includes the yEnc version of both files

Re: reading from socket

2015-08-11 Thread Chris Knipe
On Wed, Aug 12, 2015 at 12:16 AM, Chris Knipe sav...@savage.za.org wrote: Lines *should* be terminated by CRLF (provided the 8-bit encoding doesn't mess up the detection), and the entire data stream is then terminated with a CRLF.CRLF (similar to a SMTP message for example in terms

reading from socket

2015-08-11 Thread Chris Knipe
the light? -- Chris.

Re: reading from socket

2015-08-11 Thread Chris Knipe
On Tue, Aug 11, 2015 at 5:28 PM, John SJ Anderson j...@genehack.org wrote: On Tue, Aug 11, 2015 at 6:58 AM, John SJ Anderson j...@genehack.org wrote: On Tue, Aug 11, 2015 at 5:24 AM, Chris Knipe sav...@savage.za.org wrote: my $numBytesToRead = 512; my $buffer; while ($bytesRead

Re: reading from socket

2015-08-11 Thread Chris Knipe
(and that is completely out of my control). But there must be a adequate and proper way to handle this data. -- Regards, Chris Knipe

UTF8, UTF-8, utf8, Utf8 encoding blues

2014-11-08 Thread Chris Knipe
Hi All, I'm reading loads, and loads of very confusing and contradicting information about UTF8 in Perl. A lot of posts are also (rightfully IMHO) stating that UTF8 is an absolute nightmare in Perl. Can someone shed some light as to what is going on here please: use Encoding; SysLog(debug, 1

Re: UTF8, UTF-8, utf8, Utf8 encoding blues

2014-11-08 Thread Chris Knipe
reason). I won't be surprised if this is a OS issue even. -- Regards, Chris Knipe -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: async, non blocking tcp server

2014-08-29 Thread Chris Knipe
On Fri, Aug 29, 2014 at 1:18 AM, Sam p...@net153.net wrote: Are you saying the normal 'unix' way won't work? (ie. listen on socket, fork on an accepted connection, do the work, close) Not at all. My problem is not related to creating, accepting, or forking at all. The block / waiting occurs

Re: async, non blocking tcp server

2014-08-29 Thread Chris Knipe
On Fri, Aug 29, 2014 at 1:18 AM, Sam p...@net153.net wrote: Are you saying the normal 'unix' way won't work? (ie. listen on socket, fork on an accepted connection, do the work, close) Oh - and yes, if that is the 'unix' way, then yes, it's unacceptable. The socket CANNOT be torn down after each

Re: async, non blocking tcp server

2014-08-29 Thread Chris Knipe
On Fri, Aug 29, 2014 at 10:10 AM, Carl Inglis carl.ing...@gmail.com wrote: I suspect you're looking for something like this: http://www.perlmonks.org/?node_id=66135 In fact, it's specifically mentioned in the Perl Cookbook: http://docstore.mik.ua/orelly/perl/cookbook/ch07_15.htm The comments

Re: async, non blocking tcp server

2014-08-29 Thread Chris Knipe
And this is effectively what I WANT to happen... [C] TAKETHIS i.am.an.article.you.will.w...@example.com [C] Path: pathost!demo!somewhere!not-for-mail [C] From: Demo User nob...@example.com [C] Newsgroups: misc.test [C] Subject: I am just a test article [C]

Re: async, non blocking tcp server

2014-08-29 Thread Chris Knipe
On Fri, Aug 29, 2014 at 10:43 AM, Carl Inglis carl.ing...@gmail.com wrote: Hi Chris, The only way this is going to work as far as I can see is some form of multi-threading - how about you have a thread which issues the commands, a thread which reads from the sockets and shoves the results

Re: async, non blocking tcp server

2014-08-29 Thread Chris Knipe
be handled via threads - but it's done and managed by the .NET modules, and thus require -very- little code, or understanding for that matter, from the programmer's point of view). Oh well - it's back to the drawing board for this one then. -- Regards, Chris Knipe -- To unsubscribe, e-mail: beginners

async, non blocking tcp server

2014-08-28 Thread Chris Knipe
. The application needs to deal with some 500Mbps in terms of bandwidth on the sockets, and a good amount of thousands of concurrent connections. Again, I'm not sure whether Net::Server will scale (we're developing / debugging currently, whilst in production we currently use xinetd). Many thanks, Chris.

Date::Parse and strange dates

2014-07-25 Thread Chris Knipe
out. The formats in question that I can't parse basically looks like Thu, 23 Oct 2008 12:06:48+0400 Note the lack of a space between the seconds and the timezone. Is there a simple quick way to fix that by means of a regex? Many thanks, Chris.

Re: Date::Parse and strange dates

2014-07-25 Thread Chris Knipe
On Fri, Jul 25, 2014 at 7:12 PM, Andy Bach afb...@gmail.com wrote: On Fri, Jul 25, 2014 at 11:54 AM, Chris Knipe sav...@savage.za.org wrote: Thu, 23 Oct 2008 12:06:48+0400 Note the lack of a space between the seconds and the timezone. Well, depending upon the consistency of your one bad

Problem installing a module

2014-07-23 Thread Chris
I can interface SpamAssassin with ClamAV. Any help or advice would be appreciated. This is being installed on a Ubuntu 14.04 LTS box. Thank you Chris -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Problem installing a module

2014-07-23 Thread Chris
On Thu, 2014-07-24 at 00:28 +1200, Kent Fredric wrote: On 22 July 2014 06:05, Chris cpoll...@embarqmail.com wrote: I'm not a programmer so I apologize if I'm on the wrong list but I'm looking for some assistance in installing File::Scan::ClamAV. I've tried

Re: Problem installing a module

2014-07-23 Thread Chris
On Wed, 2014-07-23 at 09:06 -0500, Sam wrote: On 07/23/2014 07:53 AM, Chris wrote: On Thu, 2014-07-24 at 00:28 +1200, Kent Fredric wrote: On 22 July 2014 06:05, Chris cpoll...@embarqmail.com wrote: I'm not a programmer so I apologize if I'm on the wrong list but I'm

Re: Problem installing a module

2014-07-23 Thread Chris
this to the person who assisted me with the changes. Hopefully he'll take up the challenge. I'll be posting the changes I made here in a few, however, there are still problems getting it to work. Chris -- Chris 31.11°N 97.89°W (Elev. 1092 ft) 17:14:56 up 2 days, 23:29, 3 users, load average: 0.15, 0.13, 0.21

Re: Problem installing a module

2014-07-23 Thread Chris
as attachments. The only changes were in the 't' folder. -- Chris 31.11°N 97.89°W (Elev. 1092 ft) 21:21:03 up 3 days, 3:35, 1 user, load average: 0.34, 0.22, 0.23 Ubuntu 14.04 LTS, kernel 3.13.0-32-generic mkconf.pl Description: Perl program 00basic.t Description: Perl program 02reload.t Description

Re: Problem installing a module

2014-07-23 Thread Chris
On Wed, 2014-07-23 at 21:25 -0500, Chris wrote: On Thu, 2014-07-24 at 02:23 +1200, Kent Fredric wrote: On 24 July 2014 02:06, Sam p...@net153.net wrote: Can you post those changes or a link to the mailing list? It might be wise for someone

Re: question on escaping shell command

2014-05-16 Thread Chris Knipe
instead, and it seems to be working better. -- Chris. On Fri, May 16, 2014 at 10:54 AM, Simon Foutaiz smo...@gmail.com wrote: You can take a look at the IPC::Cmd module that should remove some pain when dealing with system commands through Perl. https://metacpan.org/pod/IPC::Cmd On Thu

question on escaping shell command

2014-05-15 Thread Chris Knipe
or where I put quotes / escape strings, I cannot get bash to execute the echo statement. Can anyone shed some light on this subject perhaps? I know it's more than likely a little bit off topic, but I would appreciate the assistance. -- Chris. -- To unsubscribe, e-mail: beginners-unsubscr

Net::Server and SSLEAY issues

2014-02-22 Thread Chris Knipe
= /home/cknipe/src/server.crt, # SSL Public Certificate ); Would appreciate it if anyone can perhaps shed some light for me. Thanks, Chris. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Parsing a email attachment over SSL

2013-07-29 Thread Chris Datfung
= $subject, ON = $today}); my @messages = $imap-search(SUBJECT = $subject, ON = $today); but none of these worked. How can I search on multiple criteria using Mail::IMAPClient? Thanks, Chris

issue with threaded IO::Socket::INET

2013-05-19 Thread Chris Knipe
@NNTPWEB01:/srv/nntp/bin# I've tried various ways to do the while loop, but pretty much everything is showing the same results, which is why I'm thinking more towards that there's an threading issue... I would appreciate any assistance. -- Chris. -- To unsubscribe, e-mail: beginners-unsubscr

Battling with threaded TCP server

2013-05-18 Thread Chris Knipe
to sit here spamming the lists). At this stage, I'm even willing to pay if that's what it needs to come down to... Many thanks, Chris. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

IO::Socket::SSL replacement for IO::Socket::INET

2013-04-08 Thread Chris Knipe
-close; ClientConnection($ClientSocket); undef $Childs{$Child}; exit 0; } else { $Childs{$Child} = 1; $ClientSocket-close(); } } -- Chris. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http

Re: Does perl hava free edition for AIX, Solaris?

2013-03-27 Thread Chris Jack
r...@linuxstuff.pl wrote: On Mon, Mar 18, 2013 at 07:20:37PM GMT, Hal Wigoda wrote: Any version of Sun Solaris should already come with the current Perl. I guess that depends what you mean by current Version 5 ;-) -- To unsubscribe, e-mail:

anonymous array for loop

2013-03-09 Thread Chris Stinemetz
Thank you in advance. Each anonymous array @files and @newFiles has 5 total elements. How can I alter this nested for so that just the unique elements are printed instead of each element twice? foreach my $file (@files) { foreach my $newFileName ( @newFiles ) { print join( \t, @$file,

Re: anonymous array for loop

2013-03-09 Thread Chris Stinemetz
] $!; } Thanks, Chris

Re: anonymous array for loop

2013-03-09 Thread Chris Stinemetz
On Sat, Mar 9, 2013 at 2:57 PM, Brandon McCaig bamcc...@gmail.com wrote: On Sat, Mar 09, 2013 at 07:24:37AM -0600, Chris Stinemetz wrote: Each anonymous array @files and @newFiles has 5 total elements. Just to nitpick, @files and @newFiles are not anonymous arrays. They are just arrays

Net::FTP

2013-03-08 Thread Chris Stinemetz
is appreciated. Thank you, Chris

large files

2013-03-05 Thread Chris Stinemetz
by only taking a little over 1 minute but I am curious if there is a way to still improve the time to read in the file or is this a reasonable time. while () { chomp($_); my @tokens = split( ;, $_, 44 ); } Thank you, Chris

printf

2013-03-04 Thread Chris Stinemetz
,$catt,$cest,$pcEst,$rfLost, $cpDropCell,$cpDropRnc,$tuneAway,$tDrops,$pDcr,$ia,$pIa,$tccf,$failAp,$failTp,$failA10,$failAAA,$failPDSN; Thank you, Chris

am I missing something?

2013-03-03 Thread Chris Knipe
that 'next' is behaving like 'last' in this example. What would be the correct way to do this? -- Chris. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: am I missing something?

2013-03-03 Thread Chris Knipe
Hi, Was an issue somewhere else in my code. Been using an $counter to keep track of the records and I executed next without incrementing the counter. Sorry guys :) On Sun, Mar 3, 2013 at 11:43 AM, sisyph...@optusnet.com.au wrote: -Original Message- From: Chris Knipe my @array

Re: separating code in two files

2013-03-02 Thread Chris Stinemetz
On Fri, Mar 1, 2013 at 3:37 PM, Chris Stinemetz chrisstinem...@gmail.comwrote: On Fri, Mar 1, 2013 at 11:00 AM, Shlomi Fish shlo...@shlomifish.orgwrote: Hi Jim, On Thu, 28 Feb 2013 11:21:59 -0800 Jim Gibson jimsgib...@gmail.com wrote: On Feb 28, 2013, at 10:31 AM, Chris Stinemetz

nested subroutines

2013-03-02 Thread Chris Stinemetz
}{$pegs[0]} += session_attempts($srt); } Chris

Re: nested subroutines

2013-03-02 Thread Chris Stinemetz
Sent from my iPhone On Mar 2, 2013, at 7:49 PM, John W. Krahn jwkr...@shaw.ca wrote: Chris Stinemetz wrote: Thanks in advance. I have a subroutine inside another subroutine in a module I am tyring to put together. I would like to pass the value assigned to $srt in the while loop

Re: separating code in two files

2013-03-01 Thread Chris Stinemetz
On Fri, Mar 1, 2013 at 11:00 AM, Shlomi Fish shlo...@shlomifish.org wrote: Hi Jim, On Thu, 28 Feb 2013 11:21:59 -0800 Jim Gibson jimsgib...@gmail.com wrote: On Feb 28, 2013, at 10:31 AM, Chris Stinemetz wrote: I want to put a hash declaration in a separate file from the main script

separating code in two files

2013-02-28 Thread Chris Stinemetz
I want to put a hash declaration in a separate file from the main script. How do I do this correctly? perl.pl ( main script ) #!/usr/bin/perl use warnings; use strict; use Data::Dumper; require lib.pl; print Dumper \%hash; lib.pl ( library script ) #!/usr/bin/perl use warnings; use strict;

Re: separating code in two files

2013-02-28 Thread Chris Stinemetz
variable (in package main::), and as such is accessible by both perl.pl and lib.pl, The 'our' declaration also lets you leave off the package name when you access the variable. Thank you very much! That did the trick. Chris

Re: matching certain lines

2013-02-10 Thread Chris Stinemetz
Thank you everyone for you help. -Chris On Sat, Feb 9, 2013 at 5:15 PM, Uri Guttman u...@stemsystems.com wrote: On 02/09/2013 03:59 PM, John W. Krahn wrote: Let's re-factor that down to its essence: while ( DATA ) { print if /\|68\|/; print $1\t$2\t$3\n if /(\|\d)\|(\d+)\|(\d

Re: matching certain lines

2013-02-10 Thread Chris Stinemetz
To take this a step further. How would you go about creating a hash to sum up all the values in group $3 utilizing the flip/flop operator and print the results of the key and value with the key being group $2? Thank you, Chris while( DATA ) { if ( /0x3\|68\|/ .. /^#END/ ) { print

Re: matching certain lines

2013-02-10 Thread Chris Stinemetz
On Sun, Feb 10, 2013 at 8:05 AM, Chris Stinemetz chrisstinem...@gmail.comwrote: To take this a step further. How would you go about creating a hash to sum up all the values in group $3 utilizing the flip/flop operator and print the results of the key and value with the key being group $2

matching certain lines

2013-02-09 Thread Chris Stinemetz
I would like to only work with the data that has a line with |68| in it print that line and then print each subsequent lines in that match /\|7\|\d+\|\d+/ until #END is reached and then repeat for the rest of the input data. Below is what I have attempted. Thanks in advance. Chris #!/usr/bin

Re: other ways to parse emails from html?

2013-01-31 Thread Chris Charley
for programmers. Chris -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: other ways to parse emails from html?

2013-01-31 Thread Chris Charley
Chris Charley wrote in message Jeswin wrote in message news Hi again, I tried to use the treebuilder modules to get emails from a webpage html but I don't know enough. It just gave me more headaches. My current method get the emails is to go to the site, put the source code in MS

Re: Pattern matching to hash

2012-12-28 Thread Chris Charley
have approached it differently. #!/usr/bin/perl use strict; use warnings; my $prefix_search_list = '03S|04S'; while (DATA) { print if /^$prefix_search_list/; } __DATA__ 05S885858 03S84844 foo bar 04Sbaz *** prints C:\Old_Data\perlpperl t1.pl 03S84844 04Sbaz Hope this helps, Chris

Re: Pattern matching to hash

2012-12-28 Thread Chris Charley
Chris Charley wrote in message news Tim wrote in message news:1356726727.215915...@webmail.reagan.com... I hope this is a simple fix. I want to check the beginning characters of items in a hash, and compare that to a scalar variable. I do not need for the entire value to match; just

Re: Pattern matching to hash

2012-12-28 Thread Chris Charley
timothy adigun wrote in message news:CAEWzkh6mZohVJn__LRL60AGoqbHkmTPyn=JM=cewcmmftpj...@mail.gmail.com... Hello Chris, Please see my comment below. On Fri, Dec 28, 2012 at 10:24 PM, Chris Charley char...@pulsenet.comwrote: [snip] I only answered the question using a for loop. Am

Re: hash help !

2012-11-15 Thread Chris Charley
jet speed wrote in message news:CAG1VzcezebNiFar3YKep- What i am trying to do ? I want to match the entries from file1.txt with file.txt, if matches then print the key and value. some will have multiple entries as in the output. required output 10.00.00.00.aa.56.9b.7a 22:5a

Re: hash help !

2012-11-15 Thread Chris Charley
jet speed wrote in message news:CAG1VzcezebNiFar3YKep- What i am trying to do ? I want to match the entries from file1.txt with file.txt, if matches then print the key and value. some will have multiple entries as in the output. required output 10.00.00.00.aa.56.9b.7a 22:5a

Re: hash help !

2012-11-15 Thread Chris Charley
jet speed wrote in message news:CAG1VzcezebNiFar3YKep- What i am trying to do ? I want to match the entries from file1.txt with file.txt, if matches then print the key and value. some will have multiple entries as in the output. required output 10.00.00.00.aa.56.9b.7a 22:5a

Re: delete blank lines from text file

2012-10-01 Thread Chris Stinemetz
On Mon, Oct 1, 2012 at 3:34 AM, Irfan Sayed irfan_sayed2...@yahoo.com wrote: hi, i need to delete all blank lines from the text file I usually just skip the blank lines when I read the data one line at a time. Then you can print to a new file. My example is below: #!/usr/bin/perl use

milliseconds converted to timestamp

2012-09-27 Thread Chris Stinemetz
Hello List, I have the following millisecond value: 54599684 This represents a timestamp reported as milliseconds past midnight local time. Is there a module to convert this into a hh::mm format? Or a Perlish example to handle this? Thank you, Chris -- To unsubscribe, e-mail: beginners

Re: milliseconds converted to timestamp

2012-09-27 Thread Chris Stinemetz
On Thu, Sep 27, 2012 at 10:46 AM, Jim Gibson jimsgib...@gmail.com wrote: On Sep 27, 2012, at 8:16 AM, Chris Stinemetz wrote: Hello List, I have the following millisecond value: 54599684 This represents a timestamp reported as milliseconds past midnight local time. Is there a module

Re: cgi development environment

2012-09-19 Thread Chris Stinemetz
','contents'); 12 $q-end_html; # end the HTML Thank you in advance, -Chris -- To unsubscribe, e-mail: beginners-cgi-unsubscr...@perl.org For additional commands, e-mail: beginners-cgi-h...@perl.org http://learn.perl.org/

Re: cgi development environment

2012-09-19 Thread Chris Stinemetz
You have a couple other issues. Since you have one print statement, spread over multiple lines, the semi-colons on lines 10 and 11 are bugs. They should be commas. The semi-colons terminate the statement resulting in syntax errors. Mike Thank you. That fixed it. -Chris

cgi development environment

2012-09-18 Thread Chris Stinemetz
Hello list, I am very interested in cgi scripting. I have only used php for web development in the past. Would someone please let me know of any good tutorials to get windows based web development environment set up and get my feet wet? Thank you in advance, Chris -- To unsubscribe, e-mail

Re: cgi development environment

2012-09-18 Thread Chris Stinemetz
On Tue, Sep 18, 2012 at 5:46 AM, Mark Haney ma...@abemblem.com wrote: On 09/18/2012 08:34 AM, Chris Stinemetz wrote: Hello list, I am very interested in cgi scripting. I have only used php for web development in the past. Would someone please let me know of any good tutorials to get windows

Re: how to deal with columns in perl

2012-09-17 Thread Chris Stinemetz
three is the same. In this case, I would like the output of my result be as follows: R^2 genename 0.3899163577POPTR_0002s00200 0.2314956035POPTR_0002s00210 Maybe something like this: HTH, Chris #!/usr/bin/perl use 5.010; use strict; use warnings; use Data::Dumper; my %hash

Re: how to deal with columns in perl

2012-09-17 Thread Chris Stinemetz
Sorry forgot you wanted the average. Revised program is below: #!/usr/bin/perl use strict; use warnings; use Data::Dumper; my %hash; my $counter; while ( my $line = DATA ) { my @record = split( /\s+/, $line ); ## check to see if we've already added the 3rd column to the hash ##

Re: Perl Code

2012-09-09 Thread Chris Nehren
seen anyone do it correct in production. Unless they use Email::Valid or Email::Address. I'm sorry you haven't had the opportunity to work with people who are clueful about email. -- Chris Nehren | Coder, Sysadmin, Masochist Shadowcat Systems Ltd. | http://shadowcat.co.uk

Re: socket port

2012-09-02 Thread Chris Stinemetz
Thank you Peng. Are there any other suggestions from the list? Thanks in advance, Chris

Re: socket port

2012-09-02 Thread Chris Stinemetz
Thank you so much Jim. -Chris

Re: Perl Code

2012-08-31 Thread Chris Nehren
are best done with CPAN modules. My advice is to drop the class now and get a refund, if at all possible. -- Chris Nehren | Coder, Sysadmin, Masochist Shadowcat Systems Ltd. | http://shadowcat.co.uk/ pgpZ0Q9z5gjRm.pgp Description: PGP signature

Re: greater circle

2012-08-30 Thread Chris Stinemetz
for the great explanation. Yes that is close enough to 0 for me :) Thanks again. -Chris -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

socket port

2012-08-30 Thread Chris Stinemetz
; } Thanks in advance, Chris -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

greater circle

2012-08-29 Thread Chris Stinemetz
Hello List, I'm tyring to find the distance in miles between two sets of coordinates by using the module Math::Trig I'm expecting the return distance to be around 16.91 miles. Any help is greatly appriciated. Chris #!/usr/bin/perl use strict; use warnings; use Math::Trig qw(pi

Re: greater circle

2012-08-29 Thread Chris Stinemetz
); If it is the expected outcome would you please explain why? Thank you, Chris -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

array element access

2012-08-27 Thread Chris Stinemetz
of form.pl aborted due to compilation errors. Press any key to continue . . . Thank you in advance, Chris -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

grep array of arrays

2012-08-23 Thread Chris Stinemetz
idea what I am doing wrong? Thank in advance, Chris -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

  1   2   3   4   5   6   7   8   9   10   >