Re: MySQL question

2006-07-24 Thread Dave Gray
On 7/21/06, Karjala <[EMAIL PROTECTED]> wrote: Maybe I should ask this question on a database list, but it's related to DBI, so I'm asking here also: I have a field in a record in the MySQL database that contains a number. I increase it by one with $dbh->do("update table set myfield = myfield +

Re: Other ways to assign a filehandle to a variable?

2006-07-27 Thread Dave Gray
For posterity: -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: How to check the FILE HANDLE STATUS ???

2004-09-24 Thread Dave Gray
> open(FH_IN_FILE, ">file.txt"); > > # This statement is executed by some other function > close(FH_IN_FILE); > > print FH_IN_FILE "SOME DATA"; > > here before writing to file, i want to check the > status of FH_IN_FILE..(whether file is opened or > closed ) You could do something like the foll

Re: Perl and Threads

2004-10-12 Thread Dave Gray
> Mi goal is that each thread could process an element of an array that > has 10 elements, so thread0 process array[0], thread1 process array[1] > and so on until thread9 process array[9] > > Those 10 lines come from a file that Perl reads in chunks of ten lines > until EOF First of all, your cod

Re: Trouble with m///g

2004-09-30 Thread Dave Gray
> For example, the string > > " aa 444 -" > > should yield > > , , , , , . That's actually kind of tricky. How about: $aa = " aa 444 -"; @aa = $aa =~ /(?http://learn.perl.org/>

Re: Trouble with m///g

2004-09-30 Thread Dave Gray
> TIMTOWTDI: > > @list = grep length==4, /\d+/g Shouldn't that be: @list = grep length==4, $foo =~ /\d+/g; Cool solution, I wouldn't have thought to do it that way. I'm getting varying Benchmarking results, though. I think it might have something to do with grep speedups from 5.6.1 to 5.8.0.

Re: How to accumulate Hashes of Array value with the same key?

2004-09-30 Thread Dave Gray
> I have thre HoAs with the same key but different value. > How can I efficiently join the HoA: > > my %HoA = (key1 => ['A',1]); > my %HoA2 = (key1 => ['B',2]); > my %HoA3 = (key1 => ['C',2]); > > into: > > %HoA = (key1 => ['A',1],['B',2],['C',2]); I'm not sure what you want to do here... do yo

Re: How to accumulate Hashes of Array value with the same key?

2004-10-01 Thread Dave Gray
> $VAR1 = { 'key1' => ['A',1],['B',2],['C',2]}; That isn't going to do what you think it is... What you're asking for there is to use the ['B', 2] array reference as a hash key... $VAR1 = { 'ARRAY(0x804ca54)' => ['C',2], 'key1' => ['A',1] }; In order to get close to what I think you're tryin

Re: How to accumulate Hashes of Array value with the same key?

2004-10-01 Thread Dave Gray
On Fri, 1 Oct 2004 10:51:50 -0400, Dave Gray <[EMAIL PROTECTED]> wrote: > > $VAR1 = { 'key1' => ['A',1],['B',2],['C',2]}; > > That isn't going to do what you think it is... What you're asking for > there is to use the [&#

Re: Trying to use regex to make multiple change with a code segment

2004-10-21 Thread Dave Gray
> Trying to make a subject line change for a number of scripts, but having no > luck. The original code will have something like: > $MySubject = sprintf "%-s%-s%-s [descriptive Subject] for %-s\n", > $GlblInfo{subjectprefix}, >

Re: foreach..

2004-10-25 Thread Dave Gray
> this is actual part of my code.. all work but it seems that something is > wrong in foreach part.. in reality script calculate $dodatne_opcije only! > $vrsta_paketa is not added in calculation.. > > my $vrsta_paketa = { > '20MB' => 205, > '50MB' => 270, > '100MB' => 350,

Re: time limited STDIN

2007-01-04 Thread Dave Gray
On 1/4/07, Saurabh Singhvi <[EMAIL PROTECTED]> wrote: Hi all, I wanted to know a way of taking a time limited STDIN. Say for eg after 3 seconds, the STDIN should stop waiting and move forward. How do I do this?? I was trying with unless ($child) { sleep($waittime); `echo "\n"`

Re: How to pull Text from a PDF using Perl?

2007-01-04 Thread Dave Gray
On 1/4/07, Wagner, David --- Senior Programmer Analyst --- WGO <[EMAIL PROTECTED]> wrote: I need to look at the text from page 1 of a couple of thousand pdf's and do a regex on searching for the data. Before sending I tried a number of other things, but either died or showed me

Re: win32::guitest

2007-01-05 Thread Dave Gray
On 1/5/07, MGautam <[EMAIL PROTECTED]> wrote: Hi, How do we use win32::guitest to get a particular content of the webpage into a variable. I have a task: 1) open a browser 2) hit the url 3) hit few tabs and fill the required information then "submit" the form 4) after submit, it leads to new pa

Re: Checking for infinite loops

2007-01-09 Thread Dave Gray
On 1/8/07, hOURS <[EMAIL PROTECTED]> wrote: Hi everyone, Jay offered me the following code to help with something. I don't undertand it, but tried to use it anyway to see if it would work. The computer told me there was a syntax error in the area I highlighted in color. I can't find it

Re: HoHoH

2007-01-09 Thread Dave Gray
On 1/9/07, oryann9 <[EMAIL PROTECTED]> wrote: I have a HoHoH structure that looks like after running print Dumper (\%hash); 'prlhNSSA' => { '1499' => { 'gecos' => 'First Name Last Name,CIS,location,

Re: File::Find again

2007-03-26 Thread Dave Gray
On 3/25/07, Alan <[EMAIL PROTECTED]> wrote: On Sunday 25 March 2007 18:14, Matt Herzog wrote: > This is all I needed. I swear I had " /($searchstring)/; " in there at > some point before . . . so if I pass it > > -s "\.properties$" > > at the command line, it works as expetcted. Nice. That migh

Re: removing special characters

2007-04-04 Thread Dave Gray
On 4/4/07, Michael Gargiullo <[EMAIL PROTECTED]> wrote: I have a log file I'm parsing that has special characters at the end of each row. In vi it appears to be ^@ I've already tried chomp and s/\^\@// Neither work. Does any one have any ideas? You can match what vi(m) displays as '^@'

Re: Retrieving a web resource (GET) for parsing

2007-04-06 Thread Dave Gray
On 4/6/07, yitzle <[EMAIL PROTECTED]> wrote: If I want to parse a few web pages, what's the best way to retrieve them? Should I just run `wget "$url"`? LWP can do this for you. If you want more complicated interactions, WWW::Mechanize

Re: How to split a large string with repeating delimiters into multiple substrings

2007-05-25 Thread Dave Gray
Hi Michael, On 5/23/07, Michael Goopta <[EMAIL PROTECTED]> wrote: How can I split the below string and get the multiple web-addresses in a list: (i.e. the strings between and http://view-preprod.admission.net/abc/mactive/_NJMG_0002029003-01/i-1.JPG?t=tr/m:FitPad/w:199/h:124&t=ts/r:199x199http

<    1   2