RE: Drop Down list

2001-06-20 Thread Purcell, Scott
Hello Mark, That should be pretty simple, actually I do it, and probably have a code sample somewhere here... Evidently you are doing a cgi, so I would at the beginning of the cgi call for a connect to your db. Then start your HTML, then make your select on the page. print qq{}; now get your quer

Global Variable w/modules

2001-06-12 Thread Purcell, Scott
Hello And Good Morning All. I have put together some modules with the help of everyone yesterday and I am doing well. Things are starting to click. I only have one small question. As you can see by the code below, each time I need to use $q (I thought it would of been global) why do I have to pa

Assistance use Strict

2001-06-08 Thread Purcell, Scott
Hello, I am using strict and I am getting an error on the second line below. Line one, is a query that brings back a "REFERENCE TO AN ARRAY". In line 2, I am trying to grab only the LAST array element, and split it up on the newline and put that result into lines. But strict is telling me I can'

Wheres the Modules?

2001-06-06 Thread Purcell, Scott
Hello, What a silly question today, but I am trying to load a module and because of firewall issues, I cannot use PPM. I have been surfing the activestate site (which is getting more confusing by the day), the found packages, but not the right ones. I went to Http://www.activestate.com/packages b

RE: remove duplicate lines

2001-05-29 Thread Purcell, Scott
I am not an expert here, but why compare each line. Read each line into a hash, whereas each line becomes a key, and set the value to something like a 1, and your dups would be gone, quickly and I believe pretty efficiently. eg. my %textHash = (); open (SOMEDATAFILE, "<$pathToFile/theFile") or di

RE: scalar variable in regular expression

2001-04-26 Thread Purcell, Scott
In the below code, I don't see the $_ being used, but I do see a $a, wouldn't one have to do this: foreach my $a(@foo) { if ($a =~ /ABC-$i/) { print $a . "\n"; } } it is early, but I think that may be the issue. Scott -Original Message- From: Joe Schell [mailt

Ref Q

2001-04-03 Thread Purcell, Scott
Hello, >From the perlreftut, I have some in which I am creating a hash of arrays where each array only has 2 values. # creation of hash of arrays $sth = &DoSQL($sql); while (($item, $cost, $charge) = $sth->fetchrow_array()) { push @{$costtable{$item}}, ($cost, $charge); } # s

strict question

2001-03-15 Thread Purcell, Scott
Hello, I am using strict, and I am also using some references. My code has the following declared at the top of my code. use CGI qw/:standard/; use CGI::Carp qw(fatalsToBrowser); use IO::Socket; use strict; use vars qw($filename $mediabankdir $message @squawk %byName $productName); ... later on

require or module

2001-03-12 Thread Purcell, Scott
Hello, I have some code that I am always copying and pasting. It is rather large, but basically opens a socket to a certain port/IP and makes some transactions. I am basically getting tired of copying/pasting this into documents because the maintenance is starting to take its toll. I really would

Readdir only want directories

2001-02-20 Thread Purcell, Scott
Hello, Is there anyway to grep on a readdir handle and only get the directories, not any files? eg. open (SOMEDIRHANDLE, "$pathToDirectory") or die ("Problems opening $pathToDirectory. $!"); my @directories = grep /-d/, readdir SOMEDIRHANDLE; closedir SOMEDIRHANDLE; That -d does NOT work, I get

autovivication question

2001-02-14 Thread Purcell, Scott
Hello, I am collecting a large query, and it is coming back in chunks. I would like to catch the data and push it into a "Reference" to an array, and use autovivication to create that array. I have not figured out how to do that. I can push my data reference into a regular array, but I figured wh

du -k question

2001-02-08 Thread Purcell, Scott
Hello, I have a lot of web sites, and I hold my state with DBMs and textfiles (for the most part). Anyway, I just noticed that I am down to about 5% disk left. I should only be using about 5%. Anyway, is there a way to have perl do a du-k (I am on windows though). I actually don't want to look int

Version Number of Package

2001-02-01 Thread Purcell, Scott
How does one get the version of a installed package? EG. If I want to know which version of the DBI I have, what do I do? Thanks, Scott Purcell ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-w

IO vs Tie question

2000-11-10 Thread Purcell, Scott
Hello, I am trying to increase the performance in an application, and was wondering if anyone knows which would give me the bigger bang (faster that is) of "opening a flat file for data" as opposed to "tying a DBM" and grabbing a value from that hash? I am on NT, don't know if that matters. Jus

LWP::Simple Module Question

2000-10-17 Thread Purcell, Scott
Good morning, I am doing some exercises out of Andrew Johnsons book "Elements Of Programming With Perl" and was working on the example on page 244 and 245, which is the LWP module, and the GIFgraph module. Anyway, I typed in the simple following code, but cannot get anywhere outside my building.