print output from HTML::Parser

2003-03-07 Thread Steven_Massey
Hi all perl script below works, and does what I hoped it would, but I don't seem to understand how to get it to print out the result to a new file as opposed to stdout. Thanks for any help #!/usr/bin/perl -w use strict; use HTML::Parser; open(OUT, ">/share/file1") || die "Cannot open /share/fil

Rob Dixon - Re: sorting thoughts

2003-02-02 Thread Steven_Massey
Rob - Thanks for the help, it was apreciated "Rob Dixon" <[EMAI

Re: sorting thoughts

2003-01-30 Thread Steven_Massey
Thanks to all that offered help - much appreciated .. examples work ..more for me to learn... Rob If you could explain how this works, especially how $a $b are set with the compare values my @sorted = sort { (split ':', $a)[-1] <=> (split ':', $b)[-1] } @array; Thanks

sorting thoughts

2003-01-29 Thread Steven_Massey
Hi just about to embark on a sorting routine, and I thought before I spend ages(at my ability) I would see what thoughts you guys have on this. I have an array, each line contains fields seperated by ":" I want to sort the array numerically ascending by the last field. my thoughts are to split

RE: stripping web pages

2002-10-27 Thread Steven_Massey
Beau lots to understand in there .. I'll certainly be looking at the LWP::UserAgent stuff thanks - much appreciated Steve -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

stripping web pages

2002-10-26 Thread Steven_Massey
Hi I have perl scripts that I have built over the last 6 months( with MUCH help from this list), basically I save a web page as a text file and process this and dump into mysql Is it possible to to process the web page directly ?? straight into mysql - without the need to dump to text and re-rea

Re: mysql syntax problem

2002-10-02 Thread Steven_Massey
Michael Excellent - read DBI/placeholder thanks Michael Fowler

mysql syntax problem

2002-10-02 Thread Steven_Massey
Hi all when i query a mysql db within a perl script this works fine... $sth = $dbh->prepare ("SELECT venue from base1 WHERE op = 'K Trevan'"); this doesn't.. $sth = $dbh->prepare ("SELECT venue from base1 WHERE op = 'K O'Trevan'"); i know the issue is 'K O'Trevan' in that the 2nd ' completes

log window

2002-09-23 Thread Steven_Massey
Hi all any thoughts on how to approach this I have several perl scripts running and i would like to be able to open up a log window from within the script and then dump log issues into it for viewing os = unix bit like a tail -f concept but in a seperate window to that which the parent sc

Re: yet another text match and extract

2002-07-15 Thread Steven_Massey
Thanks - I've understood that -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

yet another text match and extract

2002-07-15 Thread Steven_Massey
Hi all I have this problem (not medical) and it is very similar to others that have been resolved by this group, but I have spent 5 hours trying to relsolve it and getting nowhere... So $test="Fred Flinstone Betty and Barney (Class F) (bye)"; the length is variable, the only guarantee is tha

Re: removing non-printable char

2002-07-11 Thread Steven_Massey
Jeff - thanks I will try it out. your answer raises another Q. what would I type in perldoc -format to be able to dig for that info ??? "Jeff 'japhy' Pinyan" <[EMAIL PROTECTED]> on 07/11/2002 05:42:40 PM Please respond to [EMAIL PROTECTED] To:[EMAIL PROTECTED] cc:

removing non-printable char

2002-07-11 Thread Steven_Massey
Hi all I am trying to create a sub routine to remove non-printable chars from a string, and am stuck on how I should app roach this. Any thoughts ?? Much appreciated.. Steve -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: passing scalar to function

2002-07-08 Thread Steven_Massey
Thanks Guys - will go and study perldoc perlsub now -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

passing scalar to function

2002-07-08 Thread Steven_Massey
Hi I am missing something in using functions(methinks) I simple want pass a scalar variable of 02072002, I can get it to work by treating it as an array - but this seems daft.. sub getD { @inp=@_; print @inp; } $date="06072002"; getD($date); What am I

Re: extract info from file name

2002-07-02 Thread Steven_Massey
Nigel and Connie.. Thanks a lot - much neater than I was doing Steve -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

extract info from file name

2002-07-02 Thread Steven_Massey
Hi filenameRnott230602.txt I want to break down the name and compare with other text, it breaks down as R / nott / 230602 (3 items) the length does not change. Now I know I can split() each char and combine into a string Is there a smarter way ??? Any thoughts greatly appreciated Steve

RE: unefficient code

2002-06-10 Thread Steven_Massey
First - thanks to drieux, sudarsan, jeff and janek, please understand your help is gratefully received... Second - you will be glad to know I do not write this code for a job.sigh of relief I have all your comments printed out and will sit down and digest ... Thanks Steve --

code efficiency

2002-06-09 Thread Steven_Massey
Hi All The code I have written below works, and yes I could leave it at that.. but I want if possible to write efficient code as this seems to be what PERL is all about. So any thoughts anyone ?? = this code takes a variable containin words and

Re: manipulating arrays/scalars

2002-06-04 Thread Steven_Massey
Thanks to John W Krahn and Shishir for your replys, need to learn about push -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

manipulating arrays/scalars

2002-06-03 Thread Steven_Massey
Hi any help appreciated... I am reading a file consisting of lines with upto 2 sets if data seperated by : ie 13:fred 12:nancy lional: each line is split into @a1 and @a2, here is my problem - if line does not have @a2 as in example line 3 above, I want it to take the value from line 2 ie - 1

Re: extracting array info from text file

2002-05-20 Thread Steven_Massey
Excellent !!! Not used hashes before - stuck to simple arrays.. (unix shell scripting background) idea of using time as hash key is great - but I'm going to need me to sit down and get my head around it. Thanks Sudarsan Raghavan <[EMAIL PROTECTED]>@india.hp.com on 05/20/2002 11:24:13 AM

RE: extracting array info from text file

2002-05-20 Thread Steven_Massey
Hi Not with me, it is a "home" project. I have been succsessful in using nested for loops and greping the info out into text file. But I need to now reference the data, and am having a problem picking up the different arrays. I am not after a written solution ( I enjoy the doing) but more g

extracting array info from text file

2002-05-20 Thread Steven_Massey
Hi All I have a textfile comprised of x number races each with x number of runners eg. 13:00 runner1 runner2 runner3 runner4 14:00 runner1 runner2 runner3 15:00 runner1 runner2 I want to put each race time into seperate array and each runner to be a subset of particular array, the amount of

RE: array numerical name...

2002-04-30 Thread Steven_Massey
Thats it Thanks Harry understand now.. "Jackson, Harry" <[EMAIL PROTECTED]> on 04/30/2002 11:07:39 AM To: [EMAIL PROTECTED] cc: Subject: RE: array numerical name... >-Original Message- >From: [EMAIL PROTECTED] > > > >Hi All - some interesting help - thanks drieux, chas

Re: array numerical name...

2002-04-30 Thread Steven_Massey
Hi All - some interesting help - thanks drieux, chas, tim - all good pointers to resolve. I still cannot get the array naming to print - let me simplify $h=0; $TRY$h=3; print "$TRY$h"; does not work - I have tried ${TRY\$h} also any ideas ??? what am I missing ?? Thanks [EMA

array numerical name...

2002-04-29 Thread Steven_Massey
Hi all - should be simple - but I cannot figure it out basically i want to name an array with a subscript ie world0[0] and world1[0] the 0/1 being a variable, i have tried to produce a simple example For any help - thanks.. -- @fre

Thanks - Re: multiple greps in if()

2002-04-25 Thread Steven_Massey
Excellent thanks felix and michael. Felix Geerinckx <[EMAIL PROTECTED]> on 04/25/2002 02:12:17 PM To: [EMAIL PROTECTED] cc: Subject: Re: multiple greps in if() on Thu, 25 Apr 2002 12:54:53 GMT, [EMAIL PROTECTED] (Steven Massey) wrote: > ideally I would like multiple grep pairs ie.. >

multiple greps in if()

2002-04-25 Thread Steven_Massey
Hi anyone have any ideas on how example 2 or 3 below should correctly be written ??? Thanks for any help that can be given if(grep /Handicap|Help/, $source) { this seems to work } if(grep /(Handicap && Help)/, $source) { this does not work } ideally I would like multiple grep pairs ie.. if(gre

RE: grep a array element..

2002-04-16 Thread Steven_Massey
To all that help - much appreciated.. Nikola Janceski <[EMAIL PROTECTED]> on 04/16/2002 04:54:00 PM To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>, Nikola Janceski <[EMAIL PROTECTED]> cc: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>, "Beginners (E-mail)" <[EMAIL PROTECTED]> Sub

grep a array element..

2002-04-16 Thread Steven_Massey
Hi all within a for loop I want to grep/pattern match a variable with each array element what would the syntax be ?? many thanks steve -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

compare char

2002-03-28 Thread Steven_Massey
does anyone know how to compare text ie if ( d < e ) then do this or if ( z > h ) do this thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]