Re: IPv4/IPv6 parsing

2016-07-14 Thread Chris Knipe
Hi, On Thu, Jul 14, 2016 at 10:28 PM, Илья Рассадин wrote: > It's really simple regexp that can handle this, I wrote simple example to > illustrate the idea. > > Of course, this $port_re can match invalid port (all port numbers which > higher than 65536). If it's critical

IPv4/IPv6 parsing

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

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: 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, as received by Perl

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
Hi All, I'm reading binary from a socket, and just like a normal email message on the SMTP protocol (for example), the data is terminated by \r\n.\r\n I'm saying binary because the data stream does include yEnc data (or character codes 127) I'm having issues to exit my read loop when

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
Hi All, I've looked at Net::Server (and have my new server with some 20K lines of code written in it that we're currently finalising), POE, and a few other things, but I cannot find what I am looking for. I'm hoping for some assistance / pointers please. I am looking for the following simple

Date::Parse and strange dates

2014-07-25 Thread Chris Knipe
Hi All, I have the odd (very rare) case where I am given a date in an incorrect format. I already use Date::Parse to convert the dates to a unix timestamp, and it's working incredibly well. However, on the rare case that I get incorrect dates, Date::Parse does not like them either and errors

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

Re: question on escaping shell command

2014-05-16 Thread Chris Knipe
, May 15, 2014 at 3:10 PM, Chris Knipe sav...@savage.za.org wrote: Hi All, I'm having a bit of a strange issue executing a system command through perl. The system command reads a bunch of parameters through STDIN, and responds via STDOUT. The problem is that special commands (notably

question on escaping shell command

2014-05-15 Thread Chris Knipe
Hi All, I'm having a bit of a strange issue executing a system command through perl. The system command reads a bunch of parameters through STDIN, and responds via STDOUT. The problem is that special commands (notably the # and ! character. Perl itself, escapes the characters correctly (as

Net::Server and SSLEAY issues

2014-02-22 Thread Chris Knipe
Hi all, I'm attempting to do a very simple Net::Server listening on two different ports, one being TCP and one being SSLEAY. So far this is working, but as soon as I make an normal unencrypted connection (telnet) to the SSLEAY port and *disconnect*, the Net::Server goes into an infinite loop,

issue with threaded IO::Socket::INET

2013-05-19 Thread Chris Knipe
Hi All, I have an issue with a small piece of code. I am using IO::Socket::INET to accept client connections from an socket, and then hand the connection off to an newly created thread. As soon as an client disconnects (or interrupts the tcp session), the script will exit completely. No

Battling with threaded TCP server

2013-05-18 Thread Chris Knipe
Hi, I am looking for assistance in programing an TCP Socket server. Effectively, I am looking for a skeleton to do the following: - Server starts up, and starts x amounts of threads (working) - All threads connects to an remote server via TCP and idles, keeping the connections alive

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

2013-04-08 Thread Chris Knipe
Hi All, I've successfully written quite an big perl server using IO::Socket::INET - it seems to be working pretty darn good and so far I'm happy. I'm attempting now to do the same but by using SSL. I've read up on IO::Socket::SSL, and I know that there are minor changes required in terms of how

am I missing something?

2013-03-03 Thread Chris Knipe
Hi All, my @array = (1..10); foreach my $number (@array) { next if $number == 5; print $number; } When $number == 5, perl exits the foreach loop completely, instead of skipping the record and going to the next record in the array. I am obviously missing something here, but it seems to me

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: Net::NNTP inconsistent article retrieval

2012-08-12 Thread Chris Knipe
to change this behaviour of Net::Cmd without having to change the module's code? I don't see any options o such for it. -- Chris. -Original Message- From: Paul Anderson [mailto:wackyvor...@me.com] Sent: 12 August 2012 08:04 To: Chris Knipe Cc: beginners@perl.org Subject: Re: Net::NNTP

RE: Net::NNTP inconsistent article retrieval

2012-08-12 Thread Chris Knipe
corruption) I've submitted an bug for Net::Cmd. The difference is quite substantial, and even between all the encoded content, you can visibly see where characters are removed by Perl that should not be... -- Chris. -Original Message- From: Chris Knipe [mailto:sav...@savage.za.org] Sent: 12

Net::NNTP inconsistent article retrieval

2012-08-11 Thread Chris Knipe
Hi All, I'm using Net::NNTP to transfer articles from servers. My aim is to write an NNTP proxy. I obtain the article from my parent news server, write the file to disk, and serve the current, as well as future requests for that article from the local file on the disk. My results are very

trying to match non ascii chars

2011-06-17 Thread Chris Knipe
Hi, I have bit of problem with transparent squid service. When people tries to send binary data through squid, the log files naturally doesn't like it very much. A sample of such an log file entry: 1308293915.456 0 client.host.name NONE/400 3660

Re: PERL MYSQL query IF EXISTS then UPDATE else INSERT

2010-10-20 Thread Chris Knipe
-- - Gourmet Hot Cocoa Mix http://bestfriendscocoa.com- -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- Regards, Chris Knipe

quick question

2010-03-19 Thread Chris Knipe
understand why. -- Regards, Chris Knipe

Radius Client modules

2009-04-01 Thread Chris Knipe
Hi, I've been looking at a few Radius modules to use in some applications. I need my perl scripts to send either a COA or Disconnect message to my NAS devices. Every radius client for perl I've looked at though, does not seem to support COA or Disconnects. Is there anything that anyone can

quick regex question

2009-01-09 Thread Chris Knipe
Hi, I have two lines (well, 1 line is headers, then there follows a range of data)... # INTERFACE RADIO-NAME MAC-ADDRESS AP SIGNAL-STRENGTH TX-RATE UPTIME 0 interface_name radio 00:0C:42:1F:2C:8D yes -63...@18mbps 9Mbps 2h2m38s

RE: quick regex question

2009-01-09 Thread Chris Knipe
# INTERFACE RADIO-NAME MAC-ADDRESS AP SIGNAL-STRENGTH TX-RATE UPTIME 0 interface_name radio 00:0C:42:1F:2C:8D yes -63...@18mbps 9Mbps 2h2m38s I'm looking for a foreach my $Line (@Output) { my ($interface,

Radius CPAN Modules

2006-02-20 Thread Chris Knipe
Hi, Is there any modules that supports Radius Disconnect type messages (RFC3576). Spend some extensive time going through what's available on CPAN, but I haven't found anything that supports Disconnect Messages Did I miss anything, or is radclient my only option?? :( Thanks, Chris

Moving up, processes threads

2006-01-30 Thread Chris Knipe
Hi, Last time I checked, perl's threads wasn't very popular to use. Now that's a discussion on it's own I guess, and not the intensions of this email to get into. I'm planning to develop a rather large perl application. Due to complexity, I plan to run multiple processes, each process

Re: Moving up, processes threads

2006-01-30 Thread Chris Knipe
Last time I checked, perl's threads wasn't very popular to use. Now that's a discussion on it's own I guess, and not the intensions of this email to get into. I'm planning to develop a rather large perl application. Due to complexity, I plan to run multiple processes, each process being

Re: Moving up, processes threads

2006-01-30 Thread Chris Knipe
IPC::Shareable - share Perl variables between processes IPC! That's what we used :) Thanks, -- Chris. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

Getopt::Long

2005-11-07 Thread Chris Knipe
Hi all, Just a quick question and a couple of lines of really simple code use Getopt::Long; ... GetOptions ('h' = \$h, 'b=s' = \$s ); Sub ShowHelp() { print this is help } Sub DoSomethingWithString() { ... } If ($s) { DoSomethingWithString(); } else {

Cvs.pm

2005-08-26 Thread Chris Knipe
Just a quickie... I'm trying to get to use Cvs.pm... I'm BATTLING. For one, the documentation, indicates that errors is reported by $Cvs::ERROR. $Cvs::ERROR, does not even exist in the module Does anyone have some info on how I could get some DECENT code working with this module?? After

Cvs.pm

2005-08-26 Thread Chris Knipe
Just a quickie... I'm trying to get to use Cvs.pm... I'm BATTLING. For one, the documentation, indicates that errors is reported by $Cvs::ERROR. $Cvs::ERROR, does not even exist in the module Does anyone have some info on how I could get some DECENT code working with this module??

freebsd / ifconfig

2005-05-23 Thread Chris Knipe
Hi, Is there any modules available to manipulate devices (similar to ifconfig) in perl? Basically, I need to give it a IP address, it must find out what interface the IP belogs to, and what pid opened the interface ??? Just thought I'd ask first, would be really sweet if something exist.

Re: Emulate tail -f on file

2005-05-19 Thread Chris Knipe
On Thu, May 19, 2005 at 11:54:35AM +0530, Ramprasad A Padmanabhan wrote: use File::Tail; On Thu, 2005-05-19 at 11:37, Tielman Koekemoer (TNE) wrote: Hi All, If I wanted to monitor a file in a way that would emulate tail -f (in the shell), how would I open the file? open(FILE,

expensive loops

2005-05-02 Thread Chris Knipe
Hi, open (LOG, ''.LogFile); for (;;) { while (SQUIDLOG) { # Do stuff here } } } This is unfortunately very expensive on my CPU. Are there any better ways to go about this??? tail comes to mind, but I'd prefer to do this all in perl. -- Chris. I love deadlines. I especially love

Re: expensive loops

2005-05-02 Thread Chris Knipe
by... - Douglas Adams, 'Hitchhiker's Guide to the Galaxy' - Original Message - From: Joshua Colson [EMAIL PROTECTED] To: Chris Knipe [EMAIL PROTECTED] Sent: Monday, May 02, 2005 7:18 PM Subject: Re: expensive loops On Mon, 2005-05-02 at 19:10 +0200, Chris Knipe wrote: Hi, open (LOG, ''.LogFile

Re: expensive loops

2005-05-02 Thread Chris Knipe
Thanks, seems to be doing the trick :) Very nice module indeed... -- Chris. I love deadlines. I especially love the whooshing sound they make as they fly by... - Douglas Adams, 'Hitchhiker's Guide to the Galaxy' - Original Message - From: Joshua Colson [EMAIL PROTECTED] To: Chris Knipe

slightly OT - co-ordinates

2005-04-12 Thread Chris Knipe
Lo all, This is slightly off topic, but does anyone know how to convert hours, minutes seconds coordinates into decimal? I.e. S33* 58.08, E18* 36.27'151 to the xx.x -xx.x Doing this manually / online is out of the question unfortunately. I have over 20,000 to convert :(( Thanks

CGI.pm

2005-03-29 Thread Chris Knipe
Lo all, Very quickly #!/usr/bin/perl use CGI; use strict; use warnings; my $Query = new CGI; if (!$Query-request_method() eq POST) { exit; } Using a GET / HEAD method, the IF statement never executes. I am trying to verify the user agent, but the above is just for my test - which is

Re: CGI.pm

2005-03-29 Thread Chris Knipe
Message- From: Chris Knipe [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 29, 2005 10:45 AM To: beginners@perl.org Subject: CGI.pm Lo all, Very quickly #!/usr/bin/perl use CGI; use strict; use warnings; my $Query = new CGI; if (!$Query-request_method() eq POST) { exit; } Using a GET / HEAD

Re: CGI.pm

2005-03-29 Thread Chris Knipe
-- Chris. I love deadlines. I especially love the whooshing sound they make as they fly by... - Douglas Adams, 'Hitchhiker's Guide to the Galaxy' - Original Message - From: Chris Knipe [EMAIL PROTECTED] To: beginners@perl.org Sent: Tuesday, March 29, 2005 9:00 PM Subject: Re: CGI.pm

Re: CGI.pm

2005-03-29 Thread Chris Knipe
DOH! Something Silly(tm) Thanks ;) - Original Message - From: Chris Devers [EMAIL PROTECTED] To: Chris Knipe [EMAIL PROTECTED] Cc: Perl Beginners List beginners@perl.org Sent: Tuesday, March 29, 2005 9:07 PM Subject: Re: CGI.pm On Tue, 29 Mar 2005, Chris Knipe wrote: if (!$Query

hash issue

2005-03-22 Thread Chris Knipe
Lo all, Snipette from the perl code... $RAD_REPLY{'Recv-Limit'} = $BytesAvail - $BytesUsed; $RAD_REPLY{'Xmit-Limit'} = $BytesAvail - $BytesUsed; $RAD_REPLY{'Reply-Message'} = You have . $za-format_bytes($BytesAvail - $BytesUsed) . available.; Righty. $za-format_bytes

Re: hash issue

2005-03-22 Thread Chris Knipe
: Charles K. Clarkson [EMAIL PROTECTED] To: beginners@perl.org Sent: Wednesday, March 23, 2005 3:12 AM Subject: RE: hash issue Chris Knipe mailto:[EMAIL PROTECTED] wrote: : : i.e. : $RAD_REPLY{'Recv-Limit'} = 20971520; : $RAD_REPLY{'Xmit-Limit'} = 20971520; : works. : $RAD_REPLY

Re: hash issue

2005-03-22 Thread Chris Knipe
: Allrighty The module is called from FreeRadius itself, so if : there really is nothing wrong with my code (which I suspect there : isn't), then I guess this must be moved to the FR list. But let's : rather make sure it's not the code first. To set up a test case we can assume that the

script freeze

2005-03-18 Thread Chris Knipe
Lo all, I suspect this is Crypt::RandPassword's doing, but if anyone can please help, I'd appreciate it (as always) code #!/usr/bin/perl use Crypt::RandPasswd; use Mysql; use Net::SMTP; use Number::Format; use POSIX; use strict; use Sys::Syslog; use warnings; # Stage 1: Rotate Test Passwords.

Re: script freeze

2005-03-18 Thread Chris Knipe
Strange... comment out use strict, and everything works Is this a coding error??? I can't see anything in the code that should break things, but I do realise it's perhaps not the best of code... -- Chris. - Original Message - From: Chris Knipe [EMAIL PROTECTED] To: beginners

Re: script freeze

2005-03-18 Thread Chris Knipe
The script never gets to the PRINT statements. I run it, it works. I run it again, it just sits there with a blank. Sometimes, one or more of the print statements will execute, sometimes all of them, sometimes none of them. This code is as simple as can be... Am I doing anything wrong??

I think I need another regex...

2005-03-17 Thread Chris Knipe
Lo all, I tried to do this with split(), but it's not working good at all The string: interface=something very long with spaces and all mac-address=00:02:6F:36:2D:31 ap=no wds=no rx-rate=11Mbps tx-rate=11Mbps packets=12623,18377 bytes=10829240,2009327 frames=12623,18377 (the above is one

regex needed

2005-01-18 Thread Chris Knipe
Lo everyone, Can someone please give me a regex to parse the following... Flags: X - disabled, I - invalid, D - dynamic, J - rejected, C - connect, S - static, r - rip, o - ospf, b - bgp #DST-ADDRESSG GATEWAY DISTANCE INTERFACE 0 S 0.0.0.0/0 r 198.19.0.2 1

Re: regex needed

2005-01-18 Thread Chris Knipe
- From: Randy W. Sims [EMAIL PROTECTED] To: Chris Knipe [EMAIL PROTECTED] Cc: beginners@perl.org Sent: Tuesday, January 18, 2005 4:04 PM Subject: Re: regex needed Chris Knipe wrote: Lo everyone, Can someone please give me a regex to parse the following... Flags: X - disabled, I - invalid, D

err, this is stupid, I know...

2004-03-14 Thread Chris Knipe
use warnings; $ARGV[4] = 100.200.30.40; # for the sake of clarification. my @IPs = split('.', $ARGV[4]); if ($IPs[1] 100) { print TRUE; } else { print FALSE; } running it... Use of uninitialized value in numeric lt () at ./ppp.rotate line 6. And the condition is *always* true. Now, as

Re: err, this is stupid, I know...

2004-03-14 Thread Chris Knipe
First, the first argument to split is *always* a regex. A lot of people are in the habit of passing a quoted string, but according to the perl5-porters (in a thread about a year or so ago) the first argument should always be a regex. So, use the // or m// syntax. Doing that should make

Re: document creation.

2003-08-14 Thread Chris Knipe
Please keep in mind where possible, I'd like to automatically print the invoices prior to archiving the hard documents. The documents is also quite complex layout wise, with allot of graphs (Images) and about 95% table based... Is HTML really the only alternative here?? I'm not sure

Re: document creation.

2003-08-11 Thread Chris Knipe
Now, preferably, I wanted to create MS Word documents for this, but alas, a stick was shoved into that idea. Win32::OLE doesn't work from *Nix, and RTF::Document has like zero documentation (very help full thanks)... What's my alternatives??? http://Jenda.Krynicky.cz/#Template::RTF

Stupid regex.. I'm going to kick myself...

2003-02-23 Thread Chris Knipe
Lo all, I'm doing something *really* stupid... Please kick me... while () { if ($_ =~ /LinkArea=MoreHeadlines/) { ($URL) = $_ =~ /href=($.)/; print $URL\n; } } I have a URL... a id=something href=something target=something LinkArea=MoreHeadlinestest/a Everything is

Re: Stupid regex.. I'm going to kick myself...

2003-02-23 Thread Chris Knipe
- Original Message - From: Stefan Lidman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, February 23, 2003 3:17 PM Subject: Re: Stupid regex.. I'm going to kick myself... while () { if ($_ =~ /LinkArea=MoreHeadlines/) { ($URL) = $_ =~ /href=($.)/; print

Re: Stupid regex.. I'm going to kick myself...

2003-02-23 Thread Chris Knipe
try: ($URL) = /href=(.*?)/; Not sure what I did the first time... But it works the second time... while () { if (($_ =~ /^a/i) ($_ =~ /LinkArea=MoreHeadlines/i)) { ($URL) = /href=(.*?)/; print $URL\n; } } Thanks Stefan... Much appreciated. -- me -- To unsubscribe, e-mail:

CSV inports...

2003-02-20 Thread Chris Knipe
Lo all, I got a little problem with a CSV import... It should be rather straight forward to people who do this often.. so I'm hoping for some help... I have a MS Excel exported CSV text file, with , separated values. The problem now, is that some of the values also contains a , character, and

Re: CSV inports...

2003-02-20 Thread Chris Knipe
- Original Message - From: Timothy Johnson [EMAIL PROTECTED] To: 'Chris Knipe' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, February 20, 2003 10:55 PM Subject: RE: CSV inports... I would use DBD::CSV or (I think) Text::CSV. I have a routine that I tried to use in the past, but it gets more

env

2002-11-05 Thread Chris Knipe
Lo everyone, How do I read environment variables with perl? -- me -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

executing binaries

2002-07-17 Thread Chris Knipe
Lo all, What's the best way to execute a binary command from within perl, and read text returned by the binary, as well as write data to certain prompts that the program may have? Say, I have... #./myprogram This is my program, I will ask you a question now Please give me your name: WHATEVER

Re: executing binaries

2002-07-17 Thread Chris Knipe
Thanks a million... I'll give the module a read or two or ten :p) Regards, Chris Knipe Cell: (072) 434-7582 MegaLAN Corporate Networking Services - Original Message - From: Tanton Gibbs [EMAIL PROTECTED] To: Chris Knipe [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, July 17

Re: executing binaries

2002-07-17 Thread Chris Knipe
Gibbs [EMAIL PROTECTED] To: Chris Knipe [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, July 17, 2002 9:25 PM Subject: Re: executing binaries The Perl Cookbook recipie 16.8 says use the standard IPC::Open2 module: use IPC::Open2; open2(*README, *WRITEME, $program); print WRITEME

Re: executing binaries

2002-07-17 Thread Chris Knipe
queries, and to open() / close() file handles, but needless to say, when I use open2() like this from the command line, it works. Inside my script it fails - Original Message - From: Tanton Gibbs [EMAIL PROTECTED] To: Chris Knipe [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday

Quick ways?

2002-07-14 Thread Chris Knipe
Lo all, I was just wondering if there are any quick ways to make a directory hiracy? Say, I have the following example: if (!(-X /usr/local/www/v-webs/$ClientCode/$WebList[1]/$WebList[2]/htdocs)) { // Directory doesn't exist. } What will be the most effective way to make this directory? I

Re: Quick ways?

2002-07-14 Thread Chris Knipe
On Sun, Jul 14, 2002 at 06:24:30PM +0200, Chris Knipe wrote: Lo all, I was just wondering if there are any quick ways to make a directory hiracy? [snip] Anyone with some code to share? ;-) It's your lucky day :-) You'll be wanting the mkpath function in the standard File::Path

Am I being stupid here... or?

2002-07-10 Thread Chris Knipe
Lo all, Very stupid it must be, but I can't see what I'm doing wrong here... The following if statement, always returns true (prints a), regardless of what the value of $SiteType is... #!/usr/bin/perl $SiteType = something; if ($SiteType == notsomething) { print a; } Am I doing

Re: Am I being stupid here... or?

2002-07-10 Thread Chris Knipe
On Wed, Jul 10, 2002 at 04:11:42PM -0400, Bob Showalter wrote: if ($SiteType == notsomething) { Use eq for string comparison. == is for numeric comparison. Told you I was being stupid :p I guess after a well deserved 3 week holiday, I am allowed to be a bit rusty... Work's wonderfully

Formating date string

2002-06-18 Thread Chris Knipe
Lo all, How can I convert a date such as '18 Jun, 2002 at 11:00:00 (SAT)' into a DD/MM/ HH:MM string? I've been on google for quite some time now, and looked at quite a few CPAN stuff, but I can't seem to find anything converting that specific format? -- me -- To unsubscribe, e-mail:

Re: Formating date string

2002-06-18 Thread Chris Knipe
- Original Message - From: drieux [EMAIL PROTECTED] To: begin begin [EMAIL PROTECTED] Sent: Wednesday, June 19, 2002 5:11 AM Subject: Re: Formating date string On Tuesday, June 18, 2002, at 07:29 , Chris Knipe wrote: How can I convert a date such as '18 Jun, 2002 at 11:00:00 (SAT

cutting of last char of a variable

2002-06-16 Thread Chris Knipe
Hi, How can I cut off the last char. of a string? $string = 160700Z; I want to remove the Z ? This is to import METAR weather data if anyone's interested, and if someone has a script which process and imports the Metar data already, I'd appreciate it allot :P -- me -- To unsubscribe,

Re: cutting of last char of a variable

2002-06-16 Thread Chris Knipe
Thanks, Geo::Metar was all I needed. After hunting around a little longer, I found there was already a module that could do all I needed. Application's finished, and working wonderfully. - Original Message - From: Daniel Gardner [EMAIL PROTECTED] To: Chris Knipe [EMAIL PROTECTED] Cc