Re: solved - controlling Firefox using Perl

2021-03-15 Thread Gary Stainburn
On 12/03/2021 13:34, Gary Stainburn wrote: Can anyone please point me to decent documentation for controlling Firefox using perl? I am open to any solution, but I have already looked at both Selenium::Firefox, and Selenium::Remote::Driver. I have Selenium::Firefox working on a Centos 7 box

Re: controlling Firefox using Perl

2021-03-12 Thread Gary Stainburn
On 12/03/2021 15:52, Dermot wrote: In the past I have opted to use Webdriver::Tiny. However I've only ever used it with Chromium browser but the documentation says it can work with Geckodriver. The API for Webdriver::Tiny is slightly different from Selenium::Firefox

controlling Firefox using Perl

2021-03-12 Thread Gary Stainburn
Any advice welcome. Gary 13:30:25.459 INFO - Executing: [new session: Capabilities [{acceptSslCerts=true, browserName=firefox, javascriptEnabled=true, version=, platform=ANY}]]) 13:30:25.469 INFO - Creating a new session for Capabilities [{acceptSslCerts=true, browserName=firefox, ja

use string in "use"

2020-12-14 Thread Gary Stainburn
I've written my first re-usable modules in Perl, and all goes well. However, I want to know if / how I can use a string variable in the 'use' clause. In PHP I have a simple system of turning on/off debugging and version control.  Any file *1.html is development version.  I then have $DEBUG=(

Re: regex help - only one value returned

2020-12-02 Thread Gary Stainburn
enuinely returns multiple matches.  The amendment to the REGEX worked perfectly. Gary -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

regex help - only one value returned

2020-12-02 Thread Gary Stainburn
s, it returns nothing. Can anyone point me at the correct syntax please. Gary [root@dev dev]# ./t match1='Miss Jayne Doe' 'Miss' [root@dev dev]# cat t #!/usr/bin/perl use strict; use warnings; my $T=<print "match1='$1' '$2'\n" if ($T=~/^((mr|mrs

Re: CPAN not working, or is it?

2019-03-12 Thread Gary Stainburn
On Tuesday 12 March 2019 06:16:59 Magnus Woldrich wrote: > $ perl -E 'say for @INC' > $ echo $PERL5LIB > # echo $PERL5LIB > > I'd suggest to set the PERL5LIB environment variable in your shell > config to something like ~/lib/perl5/. > > If you need the modules to be available globally and not o

CPAN not working, or is it?

2019-03-11 Thread Gary Stainburn
I'm replacing a dead F19 box with a new C7 one and I'm trying to get my Perl install completed. Ultimately, I need to get Selenium::Remote::Driver working, but I'm struggling before that. I started off as always by using RPM's for everything I possibly can. I then started to use CPAN for every

Replacing 10 year old web server

2018-06-29 Thread Gary Stainburn
I'm replacing my old F9 web server with a new C7 one. While I've used RPM's for most packages there have been times when I've had to use CPAN and PEAR. For the PEAR items I'm able to do pear list -a > pear_list.txt to get a list of all modules installed that way. Is there an equivelent comma

Re: can not locate installe module

2018-06-04 Thread Gary Stainburn
On Monday 04 June 2018 10:39:28 Shlomi Fish wrote: > is there anything in https://en.wikipedia.org/wiki/Environment_variable ? I do have some interesting perl settings, although I have no idea where they have come from. This is a brand new Centos 7 install, and prior to trying to install the th

Re: can not locate installe module

2018-06-04 Thread Gary Stainburn
On Monday 04 June 2018 09:36:02 Shlomi Fish wrote: > what does "perldoc -l MIME::Parser" say? Also see > http://perl-begin.org/FAQs/ and http://perl-begin.org/topics/cpan/ . I have tried this for all three modules installed through CPAN and all three come up with the same thing: [root@ollie2 ~]#

can not locate installe module

2018-06-04 Thread Gary Stainburn
I've juts built a new Centos 7 email server and all has gone well. I have used RPM's where possible, but for some modules I have had to use CPAN. One such module was MIME::Parser, which installed without errors. If I check my program it now says that it's fine. If I try to re-install the modu

Re: regex with HEX ascii chars

2018-04-13 Thread Gary Stainburn
On Thursday 12 April 2018 19:53:16 Shlomi Fish wrote: > Perhaps see http://perldoc.perl.org/perlunitut.html - you may need to read > the file as binary or iso8859-1 or whatever. Also see Thanks for this Shlomi. I have looked into that before briefly when doing http gets and reading office documen

regex with HEX ascii chars

2018-04-12 Thread Gary Stainburn
eacch for it using if ($line=~/[\xfb|\xfc]/) { or even just if ($line=~/\xfb/) { it always fails. What am I doing wrong? Gary -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Getting the results of a remote script

2017-11-10 Thread Gary Stainburn
Hi Shlomi, On Friday 10 November 2017 11:52:12 Shlomi Fish wrote: > > While I agree, see http://seriot.ch/parsing_json.php for a roundup of > security problems and inconsistencies in JSON parsers. Thanks for this, I'll give it a look when I get the chance. Thankfully, so far I haven't seen any p

Re: Getting the results of a remote script

2017-11-10 Thread Gary Stainburn
On Friday 10 November 2017 00:08:09 SSC_perl wrote: > > On Nov 9, 2017, at 2:06 PM, David Precious wrote: > > > > you'll get whatever the script output to STDOUT. > > Thanks a million, Dave! STDOUT was what I was missing. I've never used > that before, so this was news to me. The remote s

Re: "Information station" using Perl and Raspberry Pi

2017-07-27 Thread Gary Stainburn
(resent as it never appeared) I have seen a few projects similar to the one you've linked. This is the first one using a Pi Zero that I've seen but there's no reason why this wouldn't work. (I've never used Pi Zero's personally) A RPi2 and 3 both have 4 USB ports, LAN, HDMI, and audio out. His

Re: "Information station" using Perl and Raspberry Pi

2017-07-26 Thread Gary Stainburn
I have seen a few projects similar to the one you've linked. This is the first one using a Pi Zero that I've seen but there's no reason why this wouldn't work. (I've never used Pi Zero's personally) A RPi2 and 3 both have 4 USB ports, LAN, HDMI, and audio out. His point about a Pi2 and a smalle

Re: Mail::Sender and Precedence: bulk [solved]

2017-04-21 Thread Gary Stainburn
am it worked fine. By fixing the syntax errors the original program now also works. Gary On Friday 21 April 2017 09:46:07 Gary Stainburn wrote: > This is the constructor I (almost) always use when using Mail::Sender. > > my $sender=new Mail::Sender {from=>'we

Mail::Sender and Precedence: bulk

2017-04-21 Thread Gary Stainburn
This is the constructor I (almost) always use when using Mail::Sender. my $sender=new Mail::Sender {from=>'webmas...@ringways.co.uk', reply=>'webmas...@ringways.co.uk', headers=>'Precedence: bulk', smtp=>'mail.ringways.co.uk', fake_from=>'Webmast

Re: event driven daemon

2016-12-22 Thread Gary Stainburn
een the requester and > the worker. > One of my favorite, simple approaches is to put files into a directory. > Each file represents a tasks and perhaps contains interesting metadata. > > chris > > On Wed, Nov 23, 2016 at 7:36 AM, Gary Stainburn < > > gary.stainb...@ringways.c

Re: event driven daemon

2016-11-23 Thread Gary Stainburn
e here - http://perl-begin.org/uses/multitasking/ . > There's also https://metacpan.org/release/Reflex which I think is a > Moose-based rethinking of POE . Thanks for the extra links. I'll have a good look at them all before starting. Gary -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

event driven daemon

2016-11-22 Thread Gary Stainburn
This is a request for opinions rather than an answer to a problem. I'm looking to write a daemon that can sit on my Domoticz (home automation) server and can respond to Domoticz events and can receive commands to run tasks that would otherwise block the server. These will include things like 1

perl script with errors?

2015-11-25 Thread Gary Baker
gb@MINT ~/Perl5/perl programs $ cat prog164.pl #!/usr/bin/perl use strict; use warnings; while ($line = <>) { while ($line =~ s#\d+\s*[*+-/]\s*\d+(\s*[*+-/]\s*\d+)*##) { eval ("\$result = $&;"); $line =~ s//$result/; } print ($line); } gb@MINT ~/Perl5/perl pr

Re: virus detection - empty DOC or XLS with a macro

2015-10-20 Thread Gary Stainburn
I still haven't worked out how to check for macros yet but the text has been sorted #!/usr/bin/perl use strict; use warnings; use Text::Extract::Word; use Spreadsheet::ParseExcel; use Spreadsheet::ParseXLSX; use File::Basename; if (!$ARGV[0]) { die "Usage: $0 "; } if (! -r $ARGV[0]) { die

Re: virus detection - empty DOC or XLS with a macro

2015-10-20 Thread Gary Stainburn
to check. > > regards. > > On 2015/10/19 星期一 18:35, Gary Stainburn wrote: > > Is there any way within Perl to examine DOC and XLS files to > > > > 1) see if the document is empty, i.e. no text and no cell contents > > 2) has Macros embedded > > > >

virus detection - empty DOC or XLS with a macro

2015-10-19 Thread Gary Stainburn
ain a virus. I'm trying to stop them. I know I can do the first bit for XLS files using Spreadsheet::ParseExcel, and I'm looking to see how to do this for DOC files. However, I can't find out how to do step 2. The result I need to be able to run on a Centos / Exim setup. Gary

Re: access hash in specific sequence

2015-09-04 Thread Gary Stainburn
On Thursday 03 September 2015 21:50:54 Marius Gavrilescu wrote: > gary.stainb...@ringways.co.uk (Gary Stainburn) writes: > > On Thursday 03 September 2015 18:19:57 Marius Gavrilescu wrote: > >> The above can be shortened using the Sort::Key module. > >> >

Re: access hash in specific sequence

2015-09-03 Thread Gary Stainburn
On Thursday 03 September 2015 18:19:57 Marius Gavrilescu wrote: > gary.stainb...@ringways.co.uk (Gary Stainburn) writes: > > I am aware that you cannot define a key sequence when defining a hash. > > However, if I create a sequence field > > > > my %pagetypes=( > >

access hash in specific sequence

2015-09-03 Thread Gary Stainburn
I have a hash of hashes which I converted to an array of hashes because I needed to access them in a specific sequence. It now looks like my @pagetypes=( {'pagetype'=>'Delivery Note','weight'=>2,. {'pagetype'=>'Sales Invoice','weight'=>2,. {'pagetype'=>'Purchase

Best way to translate parts of strings

2015-07-24 Thread Gary Stainburn
Hi I'm still extracting text from OCR generated documents. I've managed to extract likely fields for registration numbers, stock numbers and VINs. Unfortunately some strings have a 'S' instead of a 5 or a 'B' instead of a 8 The fields are of the format RegistrationXX99XXX Stock no

Re: script to parse OCR output different between servers

2015-07-22 Thread Gary Stainburn
All I can say is,, I've not had a good day. This is the correct code for getting the most popular value. I'd forgot to update $count with $value foreach my $field (keys %found) { # foreach field my $value=''; my $count=0; foreach my $key (keys %{$found{$field}}) { # foreach field -> value

Re: script to parse OCR output different between servers

2015-07-22 Thread Gary Stainburn
element in each array. Using the map syntax you provided it is now finding matches on the second regex for the vin field. Thank you for your help Gary #!/usr/bin/perl # searches a series of OCR generated text files - one per page # looks for sets of regex's for field contents and stores

Re: script to parse OCR output different between servers

2015-07-22 Thread Gary Stainburn
On Wednesday 22 July 2015 16:10:18 Shlomi Fish wrote: > Hi Gary, > > some comments about your code. > > On Wed, 22 Jul 2015 15:32:33 +0100 > > Gary Stainburn wrote: > > I've written the code below to parse a number of text page files > > generated by Tesserac

script to parse OCR output different between servers

2015-07-22 Thread Gary Stainburn
$field (keys %found) { # foreach field my $value=''; my $count=0; foreach my $key (keys %{$found{$field}}) { # foreach field -> value $value=$key if ($found{$field}{$key} > $count); } print STDERR "field='$field' value='$value'\n";

Re: Can u suggest me the best ide for perl

2015-03-16 Thread Gary Stainburn
On Friday 13 March 2015 17:32:50 Bob goolsby wrote: > The best IDE that I know of is a properly customized VIM. That's interesting. How would define customised? I exclusively use (g)vim for editing and have a number of key bindings etc. that help in my style of working, but would still not consi

simple module install via CPAN not working.

2015-02-16 Thread Gary Stainburn
I'm still looking to get WWW::Mechanize::Firefox installed. It looks like I've got a more pressing issue. Even simple module installs aren't working properly. I'm working through the dependancy list and looking at Test::Tester and Test::NoWarnings. Installing Test::Tester worked fine, but when

Yum / CPAN install problems - WWW::Mechanize::Firefox

2015-02-16 Thread Gary Stainburn
box.com/s/c8ddvu3tg4ccrdi/perl-CPAN-install.log?dl=0 Gary Result: FAIL Failed 82/88 test programs. 14/84 subtests failed. make: *** [test_dynamic] Error 2 CORION/WWW-Mechanize-Firefox-0.78.tar.gz 4 dependencies missing (Object::Import,Shell::Command,Task::Weaken,MozRepl::RemoteObject); additionally

WWW::Mechanize::Firefox not waiting for page loaded

2015-02-10 Thread Gary Stainburn
y ideas? I've tried setting syncronize => 1 in the new() but as expected that made no difference. If I add a sleep() it works fine. Also, if I change the get() line to $mech->get('https://www.xxxxx.com/', ':content_file'=>'/home/gary/10.login.html&

Suggestions - printing to ZEBRA credit card printer attached to Win7 PC

2014-09-16 Thread Gary Stainburn
what other options are available for producing the document suitable for sending to the printer. Going back 20 years to when I used to write in Borland Delphi there was a component for creating printer documents and adding contents. Are there similar PERL modules? What are people's prefer

Re: async, non blocking tcp server

2014-08-29 Thread Gary Stainburn
there are maximum X processes running, which I believe periodicallty die and get replaced to prevent them going stale. Gary -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Help with a RE

2014-01-09 Thread Gary Stainburn
On Thursday 09 January 2014 09:53:35 Gary Stainburn wrote: > On Thursday 09 January 2014 02:01:55 timothy adigun wrote: > > Hi, > > > > On Thu, Jan 9, 2014 at 11:57 AM, Peter Gordon > > wrote: > > > I'm trying do write a one line RE to strip sequence number

Re: Help with a RE

2014-01-09 Thread Gary Stainburn
0-9_-]+//; Shouldn't that be s/^[0-9]+[-_]// -- Gary Stainburn Group I.T. Manager Ringways Garages http://www.ringways.co.uk -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Tips or Tricks to print out tab-separated data?

2013-06-21 Thread Gary Stainburn
ant. What your code did was to tag the "\n" onto the end of the array then pass the whole thing to join. Gary -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Spreadsheet::WriteExcel - multi-coloured text in cells

2013-05-15 Thread Gary Stainburn
Hi folks Is it possible to write text cells where part of the string is highlighted in red? If so, how can I do it? Gary -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: ISO decoding

2012-11-06 Thread Gary Stainburn
On Tuesday 06 November 2012 12:25:27 Shlomi Fish wrote: > > Please see: > > https://metacpan.org/module/MIME::Words > > Regards, > > Shlomi Fish > Worked a treat. Thanks -- Gary Stainburn Group I.T. Manager Ringways Garages http://www.ringways.co.uk -- To uns

ISO decoding

2012-11-06 Thread Gary Stainburn
859-1?B?UmluZ3dheXMgRG9uY2FzdGVy?= =?ISO-8859-1?B?IEtpYSBTaG93cm9vbQ==?=" '; $from=decode('iso-8859-1',$from); print "from='$from'\n"; but the string doesn't get decoded. -- Gary Stainburn Group I.T. Manager Ringways Garages http://www.ringways.co.

Re: SOLVED: inetd vs console calling a script

2012-10-12 Thread Gary Stainburn
On Thursday 11 October 2012 20:53:08 Andy Bach wrote: > On Thu, Oct 11, 2012 at 4:36 AM, Gary Stainburn > > wrote: > >> Is there a quick and easy way to detect which method called it? > > > > my $xinetd=(defined $ENV{REMOTE_HOST}); > > MIght be intere

SOLVED: inetd vs console calling a script

2012-10-11 Thread Gary Stainburn
On Thursday 11 October 2012 10:22:04 Gary Stainburn wrote: > Hi folks. > > I've got a server script that I call via xinetd. I occasionally call it > from the command line too, but now want it to handle the interactions > differently depending on how it's called. > >

inetd vs console calling a script

2012-10-11 Thread Gary Stainburn
Hi folks. I've got a server script that I call via xinetd. I occasionally call it from the command line too, but now want it to handle the interactions differently depending on how it's called. Is there a quick and easy way to detect which method called it? Gary -- Gary Stainburn

Re: Win32::Watir on strawberry Perl

2012-09-04 Thread Gary Stainburn
example now works great. Does anyone know of more useful examples of using Watir? -- Gary Stainburn Group I.T. Manager Ringways Garages http://www.ringways.co.uk -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Win32::Watir on strawberry Perl

2012-09-04 Thread Gary Stainburn
riteables.tar.gz Running make install Appending installation info to C:\strawberry\perl\lib/perllocal.pod SHIMI/Win32-Watir-0.06-withoutworldwriteables.tar.gz C:\strawberry\c\bin\dmake.EXE install UNINST=1 -- OK cpan> -- Gary Stainburn Group I.T. Manager Ringways Garages http://www.ringways.co.uk -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Win32::Watir on strawberry Perl

2012-09-04 Thread Gary Stainburn
Hi folks After a number of weeks I'm returning to my poject to automate some file downloads. I've installed Win32::Watir and typed in the example program. However, it doesn't run. I've had a look at the code and I can't see why it is complaining. Can anyone hel

SOLVED Re: Regex sending me mad

2012-07-27 Thread Gary Stainburn
nce the over the top spec. The problem eventually turned out to be that the "space" between the make and model wasn't actually a space, i.e. wasn't ASCII 32. I have now got the people generating the data to generate it correctly and all is now fine, with a much simpler reg

Regex sending me mad

2012-07-27 Thread Gary Stainburn
a' About to split 'Kia Venga' I have a test script which works fine. Can anyone see what I'm doing wrong? #!/usr/bin/perl -w use warnings; use strict; my $t='Kia Venga'; if ($t=~/ *?(\w*) (.*?) *$/) { print "1='$1' 2='$2'\n"; } [root

Re: & and subroutine

2012-04-17 Thread Gary Stainburn
On Tuesday 17 April 2012 15:13:40 Manfred Lotz wrote: > You have > sub mysub() { > > instead of > > sub mysub { > > which is the correct way. Thank you. I can't believe how many years I've been getting that one wrong. Gary -- To unsubscribe, e-mail:

Re: & and subroutine

2012-04-17 Thread Gary Stainburn
recommended. Hmm, at least I > do no recommend it. > > > Use 2. and you'll be happy. > > > There are surely some other situations where using & might be > appropriate. But this one came into my mind immediately. >Hi Manfred, Thank you for this, but below is what I am

Re: & and subroutine

2012-04-17 Thread Gary Stainburn
> > It's good practice not to use it unless you understand exactly why you > would need to use it. Could someone please expand on this as I seem to always have to do this. If I 'use strict' and 'use warnings' I get errors if I don't. -- Gary Stain

Re: WWW::Selenium click not working - CPAN install problem

2012-04-05 Thread Gary Stainburn
results for installing this module, try: reports LUKEC/Test-WWW-Selenium-1.32.tar.gz Running make install make test had returned bad status, won't install without force Failed during this command: LUKEC/Test-WWW-Selenium-1.32.tar.gz : make_test NO cpan[2]> On Thursday 05 Ap

WWW::Selenium click not working

2012-04-05 Thread Gary Stainburn
Hi folks. Returning to Perl on Win32 for the first time in ages. Installed Strawberry Perl and WWW::Selenium. However, when I run the example in the CPAN help page, it hangs because the $sel->click doesn't work. If I manually click on the button the rest of the script works fine. Anyone got a

Re: SOLVED - Re: perl and pipes - reading from syslog-ng

2010-12-15 Thread Gary Stainburn
27;ve read the page, and changed my code accordingly. Thank you. > Regards, > > Shlomi Fish > > > and now it works perfectly. -- Gary Stainburn I.T. Manager Ringways Garages http://www.ringways.co.uk -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

SOLVED - Re: perl and pipes - reading from syslog-ng

2010-12-15 Thread Gary Stainburn
Isn't it typical. Been working on this since yesterday, but as soon as I post the question I find the answer· I've changed foreach my $line () { to while () { my $line=$_; and now it works perfectly. On Wednesday 15 December 2010 11:19:07 Gary Stainburn wrote: > Hi fo

perl and pipes - reading from syslog-ng

2010-12-15 Thread Gary Stainburn
I see the output as it is being generated. The program works perfectly fine if I redirect STDIN from an old log file, but if I run it as either firewall_monitor ) { my $wline=$line; print "$line\n"; } # while STDIN -- Gary Stainburn I.T. Manager Ringways Garages http://www.rin

Passing a REGEX as an argument to a sub

2010-11-22 Thread Gary Stainburn
m accessing I'm having to do a lot of manual HTML parsing. The code is: foreach (split(/\n/,$html)) { if (/HREF="(.*)".*SomeDisplayText/) { $URL=$1; last; } Is there a way I can change this to a sub and pass the HTML string and the regex as arguments? Thanks -- Gary

Solved: First LWP::UserAgent and HTML::Form app.

2010-03-30 Thread Gary Stainburn
Sod's law folks. Posted the question then reviewed what I'd done and found the problem. Mixing three examples gave me the wrong code. Lifted the line straight from the HTML::Form perldoc and it worked. $req=$ua->request($form->click); Gary On Tuesday 30 March 2010 09:41:5

First LWP::UserAgent and HTML::Form app.

2010-03-30 Thread Gary Stainburn
following: Code snippet: my $form=shift(@forms); my @inputs=$form->inputs; for (my $i=0; $i<$#inputs;$i++) { my $inp=$inputs[$i]; my $type=$inp->type; my $name=$inp->name; my $value=$inp->value; print "type='$type' name='$name' value='$value

Re: How to read email from Inbox

2008-12-23 Thread Gary Stainburn
a > This is not something I've done but I know there are lots of CPAN modules for doing this. Go to http://search.cpan.org/search?query=mail+web&mode=all and the first suggestion I got was Mail::Webmail::GMail For traditional mail server setups try searching for POP3 or IMAP -- G

Re: grabbing text between two tokens

2008-04-14 Thread Gary Stainburn
r =~ m/tokena(.*?)tokenb/ms; The ? after the * stops it being greedy - i.e. it stops at the 1st tokenb and not the last Gary -- Gary Stainburn This email does not contain private or confidential material as it may be snooped on by interested government parties for unknown and undisclos

Re: [OT] Warnings from code when using perl-dbi

2007-08-16 Thread Gary Stainburn
} else { print "\"$field\""; } if (@row) # fields left, stick in a comma { print ","; } } print ("\n"); } -- Gary Stainburn This email does not contain private or confidential material as it may be snooped on by intere

RT3 re-install, DBI login problem.

2007-08-09 Thread Gary Stainburn
Set($DatabasePassword , ''); Set($DatabaseName , 'rt3'); *** listing 4 [Thu Aug 09 09:10:59 2007] [error] [client 10.2.1.3] Connect Failed FATAL: password authentication failed for user "rt_user"\n\n at /opt/rt3/lib/RT.pm line 205\n -- Gary Stainburn This emai

Re: Extreme beginner question on reading lines from a file.

2007-07-18 Thread Gary Stainburn
. If it fails it returns false and the loop exits. Loosely speaking anyway Gary > > -Original Message- [snip] > Hi Ayesha > > you need to only read once per line, but remember the last one. > > $prev= > while ($this=) { > print "$prev and $this\n"; >

Re: Extreme beginner question on reading lines from a file.

2007-07-18 Thread Gary Stainburn
> > Any suggestions here will be very helpful > > thanks > Ayesha Hi Ayesha you need to only read once per line, but remember the last one. $prev= while ($this=) { print "$prev and $this\n"; $prev=$this; } Gary -- Gary Stainburn This email does not contain private or

Re: Dynamically loading perl code

2007-07-12 Thread Gary Stainburn
ou thinking about the eval function. perldoc -f eval Gary -- Gary Stainburn This email does not contain private or confidential material as it may be snooped on by interested government parties for unknown and undisclosed purposes - Regulation of Investigatory Powers Act, 2000 -- T

Re: TWO loops and ONE

2007-07-03 Thread Gary Stainburn
line 11 again. Work out what values $j and $j+1 will have as you go through the two loop2. If you get an uninitialized value error on an array it usually means you've shot off the end of it. -- Gary Stainburn This email does not contain private or confidential material as it may be snooped o

Re: Fwd: TWO loops and ONE if statement

2007-07-03 Thread Gary Stainburn
ue, look at how you are indexing the array - specifically on line 11. If necessary, walk through the program with pen and paper. The mistake you've made is a common one Gary (BTW, please keep things on-list so others can share/help) -- Gary Stainburn This email does not contain priva

Re: Fwd: TWO loops and ONE if statement

2007-07-03 Thread Gary Stainburn
hen you don't use it, so you don't need it anyway. (Hint, re-think about the array index ranges you're looking at) -- Gary Stainburn This email does not contain private or confidential material as it may be snooped on by interested government parties for unknown and undisclosed purp

SOLVED - Re: Tie::Handle::CSV

2007-06-28 Thread Gary Stainburn
continues as it should. Thanks for your help. Gary On Wednesday 27 June 2007 19:49, Chas Owens wrote: > On 6/27/07, Jay Savage <[EMAIL PROTECTED]> wrote: > snip > > > Make sure that the last record in your file is correctly terminated > > (i.e. there are no unclosed

Re: Tie::Handle::CSV

2007-06-27 Thread Gary Stainburn
odule and I can't see any reference to why it should do this, or how to stop it. -- Gary Stainburn This email does not contain private or confidential material as it may be snooped on by interested government parties for unknown and undisclosed purposes - Regulation of Investigatory Powers

Tie::Handle::CSV

2007-06-27 Thread Gary Stainburn
print "Estimate Sent:\t",$csv_line->{"Estimate Sent"}, "\t"; print "Authorised:\t",$csv_line->{"Authorised"}, "\t"; print "Repaired:\t",$csv_line->{"Repaired"}, "\n"; print "Manufacturers Ref.:

CPAN problem - Test::WWW::Mechanize

2007-05-09 Thread Gary Stainburn
2 22.22% 5 9 t/link_status.t 83 37.50% 4 6 8 t/links_ok.t 84 50.00% 4-7 t/page_links_content.t92 22.22% 5 9 t/page_links_ok.t 52 40.00% 4-5 2 tests skipped. Failed 7/17 test scripts, 58.82% okay.

Re: what does foreach do?

2007-03-06 Thread Gary
So it sounds like from what you're saying, maybe the structure is a double-linked list? That would give the behaviour you're talking about. Chas Owens <[EMAIL PROTECTED]> wrote: On 3/6/07, John W. Krahn wrote: > Gary wrote: snip > > I'm curious about how much time

what does foreach do?

2007-03-05 Thread Gary
I hope this is the right place to ask this question. So I've seen code like this for (1..10) { print $_ } What's going on behind the scenes with that? Is it creating an array? What if I want to use for (1..100) ? Also, What's the internal structure of Perl arrays? I can't find anythi

Re: first Perl application

2006-09-11 Thread Gary Stainburn
reading the file directly, and parsing the contents. I've got a basic script that I use to read .xml files written by MS Excel, as I find that's the easiest way to import multi-sheel Excel spreadsheets. Gary -- Gary Stainburn This email does not contain private or confidential mat

Re: XML::Simple help request

2006-08-22 Thread Gary Stainburn
> -- > Owen print "cn='".$VAR1->{'cn'}."'\n"; print "email='".$VAR1->{'address-list'}[0]->{'address'}[0]->{'email'}."'\n"; Work your way down the list counting curly and s

solved - Re: POD rendering - was Re: POD: force line break?

2006-08-08 Thread Gary Stainburn
On Tuesday 08 August 2006 12:16, Mumia W. wrote: > On 08/08/2006 04:19 AM, Gary Stainburn wrote: > > [ snipped ] > > What's the best way to force the formatting similar to the original > > layout? > > Did you read the perlpod document (perldoc perlpod)? yes >

POD rendering - was Re: POD: force line break?

2006-08-08 Thread Gary Stainburn
similar to the original layout? -- Gary Stainburn This email does not contain private or confidential material as it may be snooped on by interested government parties for unknown and undisclosed purposes - Regulation of Investigatory Powers Act, 2000 -- To unsubscribe, e-mail: [EMAIL PROTECTED]

using MS Excel generated .xml files

2006-06-30 Thread Gary Stainburn
Would anyone like to pass on any experiences / recommendations before I dive headlong in. Ta Gary -- Gary Stainburn This email does not contain private or confidential material as it may be snooped on by interested government parties for unknown and undisclosed purposes - Regulation of Investig

Re: uninitialized value error

2006-06-21 Thread Gary Stainburn
e 71? Is it something like $var1=$var2; or if ($var2 == 'fred') { If so, you're trying to read a value from $var2 before you've written a value to it, hence the warning message given. -- Gary Stainburn This email does not contain private or confidential material as it may

Re: 15 Million RAW

2005-11-25 Thread Gary Stainburn
Here's my 2peneth. Avoid regex. While it's powerfull, it's also expensive. Short but sweet Gary On Friday 25 November 2005 3:31 am, Chris Devers wrote: > On Thu, 24 Nov 2005, Pierre Smolarek wrote: > > Lorenzo Caggioni wrote: > > > The program I written ta

call ext prog - best way

2005-11-24 Thread Gary Stainburn
t code. Suggestions welcome on good style and technique. Gary #!/bin/perl -w # called from exim passing a directory name as argument # calls Sophos Sweep and clamscan on the directory die "Usage: $0 " unless $ARGV[0]; # cmd - command to call # viri - result code if virus found #

Re: regex search/replace syntax

2005-11-04 Thread Gary Stainburn
On Friday 04 November 2005 12:20 pm, Xavier Noria wrote: > On Nov 4, 2005, at 13:03, Gary Stainburn wrote: > > Hi folks I've got the following code which generates > > > > Parse error: parse error in /home/httpd/html/consumables.html on > > line 290 > > > &

regex search/replace syntax

2005-11-04 Thread Gary Stainburn
vision by zero in /home/httpd/html/consumables.html on line 290 which for some reason it displays twice. Anyone got any ideas? -- Gary Stainburn This email does not contain private or confidential material as it may be snooped on by interested government parties for unknown and undiscl

Re: regex search/replace syntax

2005-11-04 Thread Gary Stainburn
On Friday 04 November 2005 12:03 pm, Gary Stainburn wrote: [snip] > $orderSQL is a string containing a number of SQL statements with the > placeholder &total; and $or_total has a value of '695.76' > Sorry, the placeholder is TOTAL not &total. I changed it to see if i

Re: What am I doing wrong?

2005-11-04 Thread Gary Stainburn
would be very much appreciated > > thanks, jean > Hi Jean I'm struggling to see what you're trying to do. Could you give me an examle of the schema/data you're working from. I'd like to have a go at rewriting this one to see how well I do. Gary -- Gary Stainburn

Re: What am I doing wrong?

2005-11-04 Thread Gary Stainburn
ty[$i]\n"; > } > else { >***print "$sku[$i-1]",', totaalaantal is ', >"$t_qty[$i-1]\n"; > } > } > } >

Re: perl and gnuplot

2005-06-28 Thread Gary Parker
no more error messages from apache. Anyway, I have a functioning verion of the script at: http://arithmometer.org/gnuplot/gnuplot_4.pl Thanks again for your assistance. Gary Parker -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: perl and gnuplot

2005-06-19 Thread Gary Parker
zentara highstream.net> writes: > I think you need to look at HTML::Entities, but you > havn't shown your code. You need to properly "decode" > the get string. Thanks for the tip; I'll check it out. The code is below. <-- Begin perl script gnuplt_1.pl --> #!/usr/bin/perl -w # gnuplot_1.pl #

Re: perl and gnuplot

2005-06-19 Thread Gary Parker
I am guessing that the problem has something to do with the fact that spaces in the URL using the GET method are represented by addition symbols. I still cannot find a way around this problem. However, I did try writing the gnuplot commands to a temporary file and then haing gnuplot retrieve them

perl and gnuplot

2005-06-19 Thread Gary Parker
with "+x" will plot. The apache error log has not been helpful to me. I can post it if anyone thinks it will help here. I have tried running gnuplot in both batch and interactive modes. A version of the script is availalbe at http://arithmometer.org/gnuplot/gnuplot_1.pl Any suggestio

Re: IP address and Browser version.

2004-11-20 Thread Gary Stainburn
if (!$VALUE); print " $KEY $VALUE "; } print " "; chomp(@SETS = qx!/bin/bash -c set!); for(@SETS) { print "$_\n"; } print " "; # Print statement (and program) ends here -- Gary Stainburn This email do

  1   2   3   4   5   >