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 - Thanks for the help, it was apreciated
"Rob Dixon"
<[EMAI
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
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
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]
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
Michael Excellent - read DBI/placeholder
thanks
Michael Fowler
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
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
Thanks - I've understood that
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
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
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:
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]
Thanks Guys -
will go and study perldoc perlsub now
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
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
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]
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
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
--
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
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]
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
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
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
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
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
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
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
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..
>
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
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
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]
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]
32 matches
Mail list logo