RE: Pattern matching

2003-07-17 Thread Sparrow, Dave
How about this: $_ = "<45>13: 16:18:46: %SYS-5-CONFIG_I"; print "$1\n" if /(%.*)$/; or, if you're reading lots of lines like this from a file: while(<>) { print "$1\n" if /(%.*)$/; } Cheers, Dave -Original Message- From: Ruben Montes [mailto:[EMAIL PROTECTED] Sent: 17 July 2003 10:2

RE: Regex question

2003-07-01 Thread Sparrow, Dave
How about print if !m/\.(gz)|(html)$/; Dave -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 01 July 2003 13:20 To: [EMAIL PROTECTED] Subject: Regex question hi, i have this regex: \.[^(gz|html)]$ this regex should match all files (lines) NOT ending with gz

Accessing MSSQL database

2003-06-25 Thread Sparrow, Dave
OK, please keep it simple... Where can I find an introduction on using Perl to access an MSSQL database? Cheers, Dave -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Parsing .csv file

2003-06-24 Thread Sparrow, Dave
> Take a look at Text::CSV or Text::CSV_XS Ah, but here's the kicker... Most people who I will give this script to will be running Perl 5.6 and WILL NOT have the ability to use any external modules, even those such as 'use strict' ! This is because they will be running a cut-down version of Perl th

Parsing .csv file

2003-06-24 Thread Sparrow, Dave
I'm reading an Excel .csv file. Fields are separated by commas. If a field contains a comma, the whole field is double-quoted (Excel does this by default). An example of an input line is as follows: field1,field2,"field3a, field3b, field3c",field4,"field5a, field5c",field6 I want to get each fiel

RE: Tassilo's email signature

2003-06-18 Thread Sparrow, Dave
[Tassilo's email snipped] Thanks for the explanation. As to why it wouldn't run for me, it turns out that I have two versions of Perl on my PC. One is 5.003_07 (comes as part of the Rational development toolset, used for ClearCase/ClearQuest) and the other is v5.8.0 which I installed myself in or

Tassilo's email signature

2003-06-18 Thread Sparrow, Dave
A regular contributor to the Perl Quiz Of The Week discussion newsgroup ([EMAIL PROTECTED]) is Tassilo von Parseval. His email signature is reproduced below. I have no idea what it does and can't get it to run. I'm curious... Any ideas? Thanks, Dave. $_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::ni