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 to your case, you can

IPv4/IPv6 parsing

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

Cache::*

2016-02-18 Thread Chris Knipe
Response = $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
> > > 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 (po

RE: reading from socket

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

RE: reading from socket

2015-09-17 Thread Chris Knipe
oesn't like, which IMHO means something is manipulating / changing 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 1

Re: reading from socket

2015-08-11 Thread Chris Knipe
On Wed, Aug 12, 2015 at 12:16 AM, Chris Knipe 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 of protoco

Re: reading from socket

2015-08-11 Thread Chris Knipe
the server stops transmitting data and waits for the next command, so there's no chance that a second data stream may be received by the client socket, at least not until the client socket issues a new command. > Does any of that help? > > I appreciate it, truly. But no, not really :-( I can honestly say, been there, done that. I realize my problem here is the really whacky way in which the data stream is encoded (and that is completely out of my control). But there must be a adequate and proper way to handle this data. -- Regards, Chris Knipe

Re: reading from socket

2015-08-11 Thread Chris Knipe
On Tue, Aug 11, 2015 at 5:28 PM, John SJ Anderson wrote: > On Tue, Aug 11, 2015 at 6:58 AM, John SJ Anderson > wrote: > >> On Tue, Aug 11, 2015 at 5:24 AM, Chris Knipe >> wrote: >> >>> >>> >>> my $numBytesToRead = 512; >>> >&

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 w

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

2014-11-08 Thread Chris Knipe
big application (and it worked fine for about a year and a half before all of a sudden just acting up for some 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/

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",

Re: async, non blocking tcp server

2014-08-29 Thread Chris Knipe
ould 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 --

Re: async, non blocking tcp server

2014-08-29 Thread Chris Knipe
On Fri, Aug 29, 2014 at 10:43 AM, Carl Inglis 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 into a queue, and >

Re: async, non blocking tcp server

2014-08-29 Thread Chris Knipe
And this is effectively what I WANT to happen... [C] TAKETHIS [C] Path: pathost!demo!somewhere!not-for-mail [C] From: "Demo User" [C] Newsgroups: misc.test [C] Subject: I am just a test article [C] Date: 6 Oct 1998 04:38:40 -0500 [C] Organization: An Exa

Re: async, non blocking tcp server

2014-08-29 Thread Chris Knipe
On Fri, Aug 29, 2014 at 10:10 AM, Carl Inglis 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 on the first URL

Re: async, non blocking tcp server

2014-08-29 Thread Chris Knipe
On Fri, Aug 29, 2014 at 1:18 AM, Sam 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 and every sin

Re: async, non blocking tcp server

2014-08-29 Thread Chris Knipe
On Fri, Aug 29, 2014 at 1:18 AM, Sam 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 whilst the soc

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

Re: Date::Parse and strange dates

2014-07-25 Thread Chris Knipe
On Fri, Jul 25, 2014 at 7:12 PM, Andy Bach wrote: > > On Fri, Jul 25, 2014 at 11:54 AM, Chris Knipe wrote: >> >> Thu, 23 Oct 2008 12:06:48+0400 >> >> >> >> Note the lack of a space between the seconds and the timezone. > > > Well, depending u

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: question on escaping shell command

2014-05-16 Thread Chris Knipe
; > > On Thu, May 15, 2014 at 3:10 PM, Chris Knipe 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 >&g

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 i

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, pas

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 errors,

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 (working)

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

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, wrote: > > > -Original Message----- From: Chris Knipe > >>

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 tha

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] Sen

RE: Net::NNTP inconsistent article retrieval

2012-08-12 Thread Chris Knipe
ing my own sockets (which I really don't want to do), would there be a way 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

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 incon

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 [<92>i<8F>>^]^D^N<9F>?[y<81>'4/^<92

Re: PERL MYSQL query "IF EXISTS then UPDATE else INSERT"

2010-10-20 Thread Chris Knipe
- u...@stemsystems.com http://www.sysarch.com-- > - Perl Code Review , Architecture, Development, Training, Support > -- > - 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
ite sure I 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 rec

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 (

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

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

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]

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 spaw

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 being

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 { ShowHel

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?? Afte

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

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? > >

Re: expensive loops

2005-05-02 Thread Chris Knipe
<[EMAIL PROTECTED]> To: "Chris Knipe" <[EMAIL PROTECTED]> Sent: Monday, May 02, 2005 7:27 PM Subject: Re: expensive loops On Mon, 2005-05-02 at 19:10 +0200, Chris Knipe wrote: Hi, open (LOG, '<'.LogFile); for (;;) { while () { # Do stuff here }

Re: expensive loops

2005-05-02 Thread Chris Knipe
..." - 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-0

expensive loops

2005-05-02 Thread Chris Knipe
Hi, open (LOG, '<'.LogFile); for (;;) { while () { # 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 the whoo

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 -

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" Sent: Tuesday, March 29, 2005 9:07 PM Subject: Re: CGI.pm On Tue, 29 Mar 2005, Chri

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: Sent: Tuesday, March 29, 2005 9:00 PM

Re: CGI.pm

2005-03-29 Thread Chris Knipe
2 PM Subject: RE: CGI.pm -Original 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() e

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 faili

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 w

Re: hash issue

2005-03-22 Thread Chris Knipe
eq "Ethernet" && $RAD_REQUEST{'Framed-Protocol'} eq "PPP") { # PPPoE } elsif ($GlobalDB) { return RLM_MODULE_NOOP; } else { return RLM_MODULE_FAIL; } } # Accounting Request sub accounting { return RLM_MODULE_OK; } sub detach { &radius

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: 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?? You

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 PROTEC

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) #!/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. $Date

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 line

Re: regex needed

2005-01-18 Thread Chris Knipe
- Original Message - From: "Randy W. Sims" <[EMAIL PROTECTED]> To: "Chris Knipe" <[EMAIL PROTECTED]> Cc: 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 foll

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: 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 m

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

document creation.

2003-08-14 Thread Chris Knipe
Lo all, I want to create large number of documents (mainly invoices) using perl. In a couple of months, I should be creating a few hundred documents per month with a few million records in total for the documents (Telecoms implementation). Now, preferably, I wanted to create MS Word documents fo

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 s

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/#T

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 (($_ =~ /^/i)) { ($URL) = /href="(.*?)"/; print "$URL\n"; } } Thanks Stefan... Much appreciated. -- me -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additi

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="($.)"/;

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... test Everything is randomly generated. Hence, I want to extract anything specified in the

Re: CSV inports...

2003-02-20 Thread Chris Knipe
:P -- me - 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) Tex

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 MS

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]

Re: executing binaries

2002-07-17 Thread Chris Knipe
Ok thanks, Got it working As silly of me as this was, I accidentally had the code inside a if statement that was returning false :-) My bad... -- me - Original Message - From: "Chris Knipe" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday,

Re: executing binaries

2002-07-17 Thread Chris Knipe
rl script, mainly allot of database 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: "Ch

Re: executing binaries

2002-07-17 Thread Chris Knipe
riginal Message - From: "Tanton 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::O

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]>

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: 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 :-

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: 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 wonderf

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 s

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 c

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: [E

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:

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, e-