Re: more on Files

2003-01-09 Thread Wiggins d'Anconia
Mark Goland wrote: So once you know that its a filehandle, how [ if you can ] can you tell which file its associated with ?? Mark Interesting question, but it seems from my recent dealings with such things, that you can't, because a filehandle doesn't necessarily have to be attached to a 'fi

perl monger needed asap...

2003-01-09 Thread Benjamin Jurado
how can i store the results in a array,hash,reference... use File::Find; use strict; my $foo1="/path/to/something"; sub foo{ #some filtering operations or even passing to another object or subroutine } find(\foo,$foo1); I have tried passing \@foo and access this via $foo1->() but it did not work.

Re: hash & arrays

2003-01-09 Thread Victor Tsang
you second @EXPORT_OK= statement reset the EXPORT_OK array, I believe the correct syntex should be. our @EXPORT_OK = qw(@T_AREA %T_IDS); Tor. Jerry Preston wrote: > > Hi!, > > I do not understand what I am doing wrong. I can pass an hash this way and > not an array using the following: > >

Re: bandwidth restricting

2003-01-09 Thread Victor Tsang
If you have a linux box, It might be a better idea to employ the traffic shapper that comes with the linux kernel instead. Tor. mod_perl wrote: > > hi all, >In my Lan I have a linux proxy .How can i restrict the bandwidth > cosumed by each user using perl .Which module i can use . >

Re: Perl Subroutines

2003-01-09 Thread R. Joseph Newton
Hi Joshua, It looks like you will need to add some paramaters and support functions to get practical use from this sub: Sub opentbl { my ($rows, $cols) = @_ my $currentRow, $currentCol; Print ""; for (currentRow = 1; $currentRow <= $rows; $currentRow++) { for ($currentCol = 0;

more on Files

2003-01-09 Thread Mark Goland
So once you know that its a filehandle, how [ if you can ] can you tell which file its associated with ?? Mark -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Perl Subroutines

2003-01-09 Thread Scott, Joshua
Wow, that was really easy! Thank you very much for your help!! Joshua Scott Security Systems Analyst, CISSP 626-568-7024 -Original Message- From: Rob Dixon [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 5:11 PM To: [EMAIL PROTECTED] Subject: Re: Perl Subroutines Hi Jos

Re: suppress STDIN from user

2003-01-09 Thread simran
Have a look at Term::ReadKey ... You need to set noecho (i think...) On Fri, 2003-01-10 at 11:32, Jose Malacara wrote: > Is there a way for perl to suppress or mask user input at the STDIN? For example, a >password or login prompt Not really trying to implement any real security here, >jus

RE: Removing a specific value from a hash whose keys contains mul tiple values

2003-01-09 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Sophia Corwell wrote: > multiple values > > > Sorry about that... > > Here is an example: > > Here is what my hash looks like: > > %compilers = ( >system1 => ['compiler_a'], >system2 => ['compiler_b', > 'compiler_c','compiler_d'], >system3 => ['compiler_e'], > ); > > Now, if I wan

Re: Top Posting Preferences (was navigate the directories)

2003-01-09 Thread R. Joseph Newton
Hi James, You had one good point there. I have now turned "automaticallly quote reply" off in my m,ailer preferences. Now my replies shoulkld include only such part of the originals as is necessary to make the connection to the prior post. I will answer another point, also: "...every paragr

Re: Perl Subroutines

2003-01-09 Thread Rob Dixon
Hi Joshua Just redirect STDOUT to the file using open: open STDOUT, "> file.htm" or die $!; opentbl(); close STDOUT; HTH, Rob "Joshua Scott" <[EMAIL PROTECTED]> wrote in message 5D23931127B7EB409640001B7E8A6E32014A2AFA@PASNT32">news:5D23931127B7EB409640001B7E8A6E32014A2AFA@PASNT32.

RE: Perl Subroutines

2003-01-09 Thread Scott, Joshua
Let me add a little more info regarding my question. The subroutines are already setup and can't be modified easily. The basic task of all the different subs is to print to STDOUT. I'd really like to be able to call this sub from another script and somehow redirect the output to a file without m

Re: Top Posting Preferences (was navigate the directories)

2003-01-09 Thread Wiggins d'Anconia
Sorry about the late post. Now I wish they would fix mozilla so it would recognize threads that have completely different subject lines as new threads instead of using whatever mail header, I thought the posts for the thread were concluded after two as I saw a bunch of replies that ended up und

Re: Top Posting Preferences (was navigate the directories)

2003-01-09 Thread Wiggins d'Anconia
How about top posting where it makes sense, aka the argument has shifted substantially, the original poster had no clue what they were talking about :-), etc. But many times inline comments in code is much shorter for the answerer and easier for both to understand, seems like it really depends

Re: Set cookie and then redirect

2003-01-09 Thread Wiggins d'Anconia
Fred Sahakian wrote: Id like to set a cookie in Perl and then redirect to another URL. Ive tried the below code, it will set the cookie but then the browser hangs, is it because it is 2 requests going to the header at the same time, or possibly not enought time for the cookie to be set? print "

suppress STDIN from user

2003-01-09 Thread Jose Malacara
Is there a way for perl to suppress or mask user input at the STDIN? For example, a password or login prompt Not really trying to implement any real security here, just curious. This is what I I would like: Enter your login:# suppressed from output Welcome, admin. or Enter you

Re: Removing a specific value from a hash whose keys contains multiple values

2003-01-09 Thread Wiggins d'Anconia
Thanks for the example :-). You want either 'delete' or 'splice' Depending on whether you want the indexes to be shifted down, see perldoc -f delete and perldoc -f splice. "Deleting an array element effectively returns that position of the array to its initial, uninitialized state. Subsequent

RE: Removing a specific value from a hash whose keys contains multiple values

2003-01-09 Thread david
Sophia Corwell wrote: > Sorry about that... > > Here is an example: > > Here is what my hash looks like: > > %compilers = ( >system1 => ['compiler_a'], >system2 => ['compiler_b', > 'compiler_c','compiler_d'], >system3 => ['compiler_e'], > ); > > Now, if I want to delete just the 'c

Re: Removing a specific value from a hash whose keys contains multiple values

2003-01-09 Thread Wiggins d'Anconia
I am not sure I understand you correctly. Are you referring to a hash which may have a list of values stored with a particular key? Keys by the nature of a hash must be unique, so the hash is changed/deleted from in the same way regardless. I also didn't understand if you meant clearing the v

Set cookie and then redirect

2003-01-09 Thread Fred Sahakian
Id like to set a cookie in Perl and then redirect to another URL. Ive tried the below code, it will set the cookie but then the browser hangs, is it because it is 2 requests going to the header at the same time, or possibly not enought time for the cookie to be set? print "Set-cookie: value=bob;";

RE: Removing a specific value from a hash whose keys contains multiple values

2003-01-09 Thread Sophia Corwell
Sorry about that... Here is an example: Here is what my hash looks like: %compilers = ( system1 => ['compiler_a'], system2 => ['compiler_b', 'compiler_c','compiler_d'], system3 => ['compiler_e'], ); Now, if I want to delete just the 'compiler_c' value from the system2 key, can I use th

Perl Subroutines

2003-01-09 Thread Scott, Joshua
I've created a group of Perl subroutines to handle the creation and layout of my web pages. These subs are used when browsing to my website. Basically all they do when invoked is print a bunch of HTML. I've now run into the scenario where I'd like to use these same subs to print static web pages

RE: Help with end-time start-time sorting problem

2003-01-09 Thread Scott, Deborah
Yes, I think so. THANKS! This is a great fantastic group. Glad I found it. >Have got what you need yet? >Wags ;) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Removing a specific value from a hash whose keys contains multiple values

2003-01-09 Thread Sophia Corwell
I am not sure how to delete a specific value from a hash whose keys contains multiple values. Could anyone advice, please? Thanks, Sophia __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- To u

RE: Help with end-time start-time sorting problem

2003-01-09 Thread Bob Showalter
Scott, Deborah wrote: > I have a txt data file that has several fields. Two of the fields are > start time and end time (listed in epoch time). > > I need to write a perl program that finds (and prints) events that > occur between midnight "last night" and "midnight tonight." > > First problem: >

Re: Top Posting Preferences (was navigate the directories)

2003-01-09 Thread Kegs
On Thu, 2003-01-09 at 20:28, R. Joseph Newton wrote: > Hi Jenda, > > I would suggest that you need a better mail client or message-filing system. > Most good mail clients support thread view precisely for discussions such as > this. I would suggest that start commenting on other peoples choice

RE: Top Posting Preferences (was navigate the directories)

2003-01-09 Thread Perry, Alan
Perry, Alan wrote: > And, top-posters can configure it so that they can still top-post, > but the >> 's will still get fixed! Well, I guess it's not perfect... :-) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Top Posting Preferences (was navigate the directories)

2003-01-09 Thread Perry, Alan
Bob Showalter wrote: > Rob Dixon wrote: >> I personally choose to top-post so that anybody reading through a >> thread won't have to page to the end of each post to get to new >> content. > > Since all the top-posters are weighing in, I better add my vote > against it. Responses should be in-line

Re: Help with end-time start-time sorting problem

2003-01-09 Thread R. Joseph Newton
So what have you treied so far? Although production efficiency may be aided by using prefab cope, the learning process is not. you should probably focus attention to the sections on the time function. You may also want to isolate elements of the localtime return string to check for the curren

Re: Reqxp help

2003-01-09 Thread R. Joseph Newton
Hi, This took a few tries to knock out: my $In = " Dec 20 13:28 guard/AFRC_AFRC00_01"; #s/ *(\w*) (.*)/ $1| $2|/; $In =~ s/ *(\w+) +(\d+) +(\d+:\d+) +(.*)\/(\D*_\D*)(\d+)_(\d+)/ $1| $2| $3 |$4\/|$5|$6_|$7/; print "$In\n"; Desired: Dec| 20| 13:28 |guard/|AFRC_AFRC|00_|01 Results: Dec| 20| 13:28

Re: Why can't use SQL "GROUP BY..."?

2003-01-09 Thread Jonathan Daugherty
# > $value2 = $dbh->prepare("SELECT page FROM $Table # > # > GROUP BY page") || die "Couldn't add record, ".$dbh->errstr(); # > # > "SQL ERROR: Can't find table names in FROM clause!" # You should use $value2 = $dbh->prepare('SELECT page FROM '."$Table".' # GROUP BY page' etc. or use quote fun

Re: Why can't use SQL "GROUP BY..."?

2003-01-09 Thread dhoubrechts
Gary Fung a écrit : > > Hi, > > I have a Perl program using DBI. I don't know why it will cause error when I use >"GROUP BY..." in SQL "SELECT" statements. > > My coding is similar as: > > $value2 = $dbh->prepare("SELECT page FROM $Table > > GROUP BY page") || die "Couldn't add record, ".$

Re: Top Posting Preferences (was navigate the directories)

2003-01-09 Thread Jenda Krynicky
From: "R. Joseph Newton" <[EMAIL PROTECTED]> > I would suggest that you need a better mail client or message-filing > system. Most good mail clients support thread view precisely for > discussions such as this. I did NOT say my mailer can't sort the messages per thread. Of course it can. And of

RE: Help with end-time start-time sorting problem

2003-01-09 Thread Scott, Deborah
Here's the txt file. Thanks! -Original Message- From: Wagner, David --- Senior Programmer Analyst --- WGO [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 2:32 PM To: Scott, Deborah; [EMAIL PROTECTED] Subject: RE: Help with end-time start-time sorting problem What do

RE: Top Posting Preferences (was navigate the directories)

2003-01-09 Thread Bob Showalter
Rob Dixon wrote: > I personally choose to top-post so that anybody reading through a > thread won't have to page to the end of each post to get to new > content. Since all the top-posters are weighing in, I better add my vote against it. Responses should be in-line and quoted material appropriate

RE: Help with end-time start-time sorting problem

2003-01-09 Thread Wagner, David --- Senior Programmer Analyst --- WGO
What does your data look like? Always helpful in this area. Once we ave an understanding then the others would be relatively simple to accomplish. Wags ;) -Original Message- From: Scott, Deborah [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 12:26 To: [EMAIL PROTECTE

Re: Top Posting Preferences (was navigate the directories)

2003-01-09 Thread R. Joseph Newton
Hi Jenda, I would suggest that you need a better mail client or message-filing system. Most good mail clients support thread view precisely for discussions such as this. I can look in the navigation pane, expand or collapse threads as needed, and look to the source message for reference to th

Help with end-time start-time sorting problem

2003-01-09 Thread Scott, Deborah
I have a txt data file that has several fields. Two of the fields are start time and end time (listed in epoch time). I need to write a perl program that finds (and prints) events that occur between midnight "last night" and "midnight tonight." First problem: The date for midnight "last night" a

Re: Why can't use SQL "GROUP BY..."?

2003-01-09 Thread R. Joseph Newton
It might be worth trying: "SELECT page FROM '$Table' \nGROUP BY page" and see what results you get. Joseph Gary Fung wrote: > Hi, > > I have a Perl program using DBI. I don't know why it will cause error when I use >"GROUP BY..." in SQL "SELECT" statements. > > My coding is similar as: > >

Re: Extracting Info from a websource

2003-01-09 Thread Dave K
> Hi listers, Hodwy! > i am a perl beginner with an interesting problem (to me atleast :). > > Problem Overview > - > Somewhere on the world wide web, exists an asp page with the following > form - > These look like 'specs', cool! And I think this format will generate alot of goo

RE: Reqxp help

2003-01-09 Thread Jensen Kenneth B SrA AFPC/DPDMPQ
Actually, first attempts weren't because of bad regexp but another stupid bug I had earlier when I was opening the file. I have it working now using: #!/usr/contrib/bin/perl open (TEST, "@ARGV[0]"); open (OUT, ">@ARGV[0].out"); while (){ s/\s(\S+)\s+(\d+)\s+(\S+)\s(\S+\/)(\S+\_)(\S+)(00\_)(\d+)/

RE: uploading and downloading files to MySQL (--2--)

2003-01-09 Thread Westgate, Jared
Mariusz wrote: > What type of field should I use for storing the path; just > VARCHAR I guess? > And as far as the filenames - make up some random file name for each > submitted file? This is a little off topic for a Perl list, but I'll give it a shot. Be forewarned, that I do not know much a

Re: Compariing Apples and Oranges?

2003-01-09 Thread R. Joseph Newton
Bob Williams wrote: > List 1 is the control list containing: Apple, Orange, Lemon, Tangerine, and Grape. > List 2 contains Apple, Tangerine, Grape, and Banana. > > I need a script ... Sound like you've got some work cut out for you. You will probably want to read up on the for() and foreach()

Re: uploading and downloading files to MySQL (--2--)

2003-01-09 Thread R. Joseph Newton
Hi Mariusz, I'd say VARCHAR(255), although even that leads to a sticky issue with DBs, since paths can be of any length up to the system maximum, [which may or may not exist]. It is true that the BLOB type exists in most databases, as a convenience. There may be some cases where the DB would b

Re: Extracting Info from a websource

2003-01-09 Thread Rob Dixon
Well, I'm not sure what to do here. It's quite possible - I would use modules LWP, HTTP::Request::Form and HTML::TreeBuilder - but if you've only just read LP then I doubt you would understand how to do it. I could write the code for you (which I'm happy to if you want) but that wouldn't teach you

Re: Reqxp help

2003-01-09 Thread Rob Dixon
Ken What exactly are the rules? I wrote this: my @file = ( ' Dec 20 13:28 guard/AFRC_AFRC00_01', ' Nov 22 2001 guard/ANCHORAGE_668300_14', ' Dec 20 08:46 guard/ALPENA_MI_503000_79', ' Dec 30 06:51 guard/ANDREWS_MD_525700_93' ); @file = map { s/\b(?=\s)/|/g;

RE: Reqxp help

2003-01-09 Thread Mark Anderson
-Original Message- From: Jensen Kenneth B SrA AFPC/DPDMPQ [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 10:59 AM To: '[EMAIL PROTECTED]' Subject: Reqxp help Trying to make a one liner regxp to covert a file. File has lines like these (lines are preceded with a space) Dec

Extracting Info from a websource

2003-01-09 Thread Sukrit
Hi listers, i am a perl beginner with an interesting problem (to me atleast :). Problem Overview - Somewhere on the world wide web, exists an asp page with the following form - On entering a valid roll number and pressing enter, results for that number are displayed. Currently

Reqxp help

2003-01-09 Thread Jensen Kenneth B SrA AFPC/DPDMPQ
Trying to make a one liner regxp to covert a file. File has lines like these (lines are preceded with a space) Dec 20 13:28 guard/AFRC_AFRC00_01 Nov 22 2001 guard/ANCHORAGE_668300_14 Dec 20 08:46 guard/ALPENA_MI_503000_79 Dec 30 06:51 guard/ANDREWS_MD_525700_93 Output needs to look like this

RE: Module import error

2003-01-09 Thread Dylan Boudreau
I was meaning to upgrade to a 5.8.0 anyway and this was just the push I needederror is gone now, script still doesn't work right but the error is gone... Thanks, Dylan -Original Message- From: Rob Dixon [mailto:[EMAIL PROTECTED]] Sent: January 9, 2003 12:15 PM To: [EMAIL PROTECTED]

upload progress

2003-01-09 Thread Mariusz
I know perl CGI is a server side, but maybe someone can suggest how to show a progress window on the client's machine while a file is being uploaded? thank you, Mariusz

Re: uploading and downloading files to MySQL (--2--)

2003-01-09 Thread Mariusz
What type of field should I use for storing the path; just VARCHAR I guess? And as far as the filenames - make up some random file name for each submitted file? thanks, Mariusz ps. If storing files in the DB is not common, what exactly is the BLOB type for? - Original Message - From: "R

Re: Top Posting Preferences (was navigate the directories)

2003-01-09 Thread Randal L. Schwartz
> "Jenda" == Jenda Krynicky <[EMAIL PROTECTED]> writes: Jenda> Besides. It's NOT top-post versus bottom-post. If you quote a message Jenda> properly (for my definition of properly) then your replies are Jenda> interspersed with the original message. Hear, hear. Jenda> And you should ALWAYS

Re: Top Posting Preferences (was navigate the directories)

2003-01-09 Thread David T-G
Rob, et al -- ...and then Rob Dixon said... % % Hi John, all Hi! % % "John W. Krahn" <[EMAIL PROTECTED]> wrote in message % [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... % > % > [ top-posting fixed ] % % I'm wondering how much of an error, if any, people think this is? I Oooh, that's quite a

Re: length of hash name

2003-01-09 Thread Jenda Krynicky
From: "Rob Dixon" <[EMAIL PROTECTED]> > Unless there is a fixed limit, which I don't think there is, I imagine > identifiers are held inside Perl as a C string, which is > null-terminated and therefore of any length supportable by the > hardware. I doubt if it will cause you problems. No they are

Re: Top Posting Preferences (was navigate the directories)

2003-01-09 Thread Jenda Krynicky
From: "Rob Dixon" <[EMAIL PROTECTED]> > Hi John, all > > "John W. Krahn" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > > [ top-posting fixed ] > > I'm wondering how much of an error, if any, people think this is? I > personally choose to top-post so tha

Re: Top Posting Preferences

2003-01-09 Thread Christopher Kruslicky
On Thursday 09 January 2003 10:56 am, Michael Weber wrote: > Give me top-posting any day! I can sort by thread and read an entire > discussion without paging down once. > > Personal preference, of course. > > -Michael > Bottom-posting makes google more useful in my opinion. If a solution is fou

RE: Top Posting Preferences (was navigate the directories)

2003-01-09 Thread Timothy Johnson
I am also on the top-posting side of the issue, but I know that there are also a substantial number of people who prefer posting their message at the end. In the end, I think it is really just a matter of preference, so I wouldn't worry about it too much. -Original Message- From: Michael

Re: Module import error

2003-01-09 Thread Rob Dixon
Hi Dylan Check your version of Fcntl. The EXPORT_TAGS hash in Fcntl.pm should have an key of 'seek' which, according to the Perl dianostics, it doesn't. As a quick fix you could try: use Fcntl qw(SEEK_SET SEEK_CUR SEEK_END); HTH, Rob "Dylan Boudreau" <[EMAIL PROTECTED]> wrote in message

Module import error

2003-01-09 Thread Dylan Boudreau
I am trying to use seek from Fcntl and am getting the following errors when I try and run the program. "seek" is not defined in %Fcntl::EXPORT_TAGS at /usr/perl5/5.00503/Exporter.pm line 67 Exporter::export('Fcntl', 'main', ':seek') called at /usr/perl5/5.00503/Exporter.pm line 182

Re: Top Posting Preferences (was navigate the directories)

2003-01-09 Thread Michael Weber
Give me top-posting any day! I can sort by thread and read an entire discussion without paging down once. Personal preference, of course. -Michael >>> "Rob Dixon" <[EMAIL PROTECTED]> 01/09/03 09:52AM >>> Hi John, all "John W. Krahn" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:

RE: Looping through a Hash

2003-01-09 Thread Timothy Johnson
The only time the foreach makes more sense (other than as a matter of preference) is if you want to sort your keys or values. e.g. foreach(sort keys %hash){ print "$_ => $hash{$_}\n"; } foreach(sort {$hash{$a} cmp $hash{$b}} keys(%hash)){ print "$_ => $hash{$_}\n"; } -Original Messag

Re: length of hash name

2003-01-09 Thread Rob Dixon
Hi Dan Guessing: Unless there is a fixed limit, which I don't think there is, I imagine identifiers are held inside Perl as a C string, which is null-terminated and therefore of any length supportable by the hardware. I doubt if it will cause you problems. Is this of real concern to you? Are you

Top Posting Preferences (was navigate the directories)

2003-01-09 Thread Rob Dixon
Hi John, all "John W. Krahn" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > [ top-posting fixed ] I'm wondering how much of an error, if any, people think this is? I personally choose to top-post so that anybody reading through a thread won't have to page to

Re: regular expressions

2003-01-09 Thread Rob Dixon
Hi Paul See below. "Paul Kraus" <[EMAIL PROTECTED]> wrote in message 021b01c2b7f3$490ed540$64fea8c0@pkrausxp">news:021b01c2b7f3$490ed540$64fea8c0@pkrausxp... > Correct me if I am wrong but wouldn't > @names = sprit /,/,$ans; That's pretty much what I did, except that I added optional leading and

RE: regular expressions

2003-01-09 Thread Paul Kraus
Correct me if I am wrong but wouldn't @names = sprit /,/,$ans; Then you could perform your tests against the array elements. if (/[A-Za-z]+/) Assuming that the names would only contain those characters. or if (/\w+/) meaning all word characters. Do the same thing. Splitting everything separated

RE: Delimiter Question

2003-01-09 Thread Paul Kraus
I think you mean $answer m/[YyNn]/ yours is looking for $answer to contain "YyNn" the brackets mean any one of the following. > -Original Message- > From: Vuctor Akinnagbe [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 09, 2003 10:11 AM > To: [EMAIL PROTECTED] > Subject: Delimiter

Re: Why can't use SQL "GROUP BY..."?

2003-01-09 Thread Jason Frisvold
Could be that page does not exist in the table you are trying to query, or that $Table is not set or calling a non-existant table... Try printing out $Table by itself before calling the SQL statement. On Thu, 2003-01-09 at 10:09, Francis Henry wrote: > Hi Gary: > > What happens when you run the

Re: Delimiter Question

2003-01-09 Thread Rob Dixon
$answer =~ m/^[YyNn]/; /R "Vuctor Akinnagbe" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > How do I challenege more than one variable like I want to check for the input of Y N y or n for a yes no question. I put until $answer =~ m/YyNn/ that did not work

Delimiter Question

2003-01-09 Thread Vuctor Akinnagbe
How do I challenege more than one variable like I want to check for the input of Y N y or n for a yes no question. I put until $answer =~ m/YyNn/ that did not work. Anybody have any solutions? - Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now

Re: Why can't use SQL "GROUP BY..."?

2003-01-09 Thread Francis Henry
Hi Gary: What happens when you run the SQL statement by itself, outside of the perl script? The error seems to lie with the SQL and not with perl/DBI. Once you're sure that the SQL statement works by itself, then put it into your script. Regards, Francis Gary Fung wrote: > Hi, > > I have

Why can't use SQL "GROUP BY..."?

2003-01-09 Thread Gary Fung
Hi, I have a Perl program using DBI. I don't know why it will cause error when I use "GROUP BY..." in SQL "SELECT" statements. My coding is similar as: $value2 = $dbh->prepare("SELECT page FROM $Table GROUP BY page") || die "Couldn't add record, ".$dbh->errstr(); Whenever I use "GROUP BY

Re: regular expressions

2003-01-09 Thread Rob Dixon
Hello, erm, "Evan N Mr Niso/Lockheed Martin Kehayias" This should do what you want: my @names; do { errmesg() if @names; my $ans = ; @names = split /\s*,\s*/, $ans; } while (grep {/[^a-zA-Z]/} @names); which splits on commas with any amount of preceding and t

regular expressions

2003-01-09 Thread Kehayias, Evan N Mr NISO/Lockheed Martin
Greetings, I am attempting to limit entries a user could make when inputting names into one of my scripts. I prompt the user to enter one or more names. One name is easy to isolate but when there are more I want to support commas. At the same time I don't want to accept anything other than name

Re: Creating Modules

2003-01-09 Thread Rob Dixon
Hi Anthony Try perldoc perlmod and perldoc perlmodlib Cheers, Rob "Anthony" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello, > > I was wondering if someone could give me a link where i can learn how to > construct Modules. > > Thank > > --

Creating Modules

2003-01-09 Thread anthony
Hello, I was wondering if someone could give me a link where i can learn how to construct Modules. Thank -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

bandwidth restricting

2003-01-09 Thread mod_perl
hi all, In my Lan I have a linux proxy .How can i restrict the bandwidth cosumed by each user using perl .Which module i can use . thanks in advance shine -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: "hidden" characters in an input stream

2003-01-09 Thread Jason Frisvold
This helped out considerably! I found that there are 3 CR's at the beginning of each line.. stripping these out makes it all work perfectly :) Thanks, On Wed, 2003-01-08 at 10:44, Christopher Kruslicky wrote: > On Wednesday 08 January 2003 3:11 pm, Jason Frisvold wrote: > > This works great :)

RE: File Handle?

2003-01-09 Thread Bob Showalter
Beau E. Cox wrote: > Hi - > > I want to determine is a variable is a file handle. > > How would I do this? > > I know how to tell if it is a ref to something, > but I can't seem to be able to find out if it > is a file handle. > > Aloha => Beau/ UNIVERSAL::isa($var, 'GLOB') should do the trick

Re: File Handle?

2003-01-09 Thread Rob Dixon
print "its a file handle\n" if ( defined fileno($FH) ); /R <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > On Thu, 09 Jan 2003 06:36:25 -0500, Mark Goland <[EMAIL PROTECTED]> wrote: > > > How about, > > > > pr

Re: Comparing Apples and Oranges

2003-01-09 Thread Rob Dixon
Hi Bob In general a hash is the way to go: my @list1 = qw ( Apple Orange Lemon Tangerine Grape ); my @list2 = qw( Apple Tangerine Grape Banana ); my %list1 = map {($_ => 1) } @list1; my @list3 = grep {$list1{$_}} @list2; print "@list3"; output: Apple Tangerine Grape H

Re: CRLF vs LF questions

2003-01-09 Thread Rob Dixon
David Re Q1. Get yourself a copy of TextPad http://www.textpad.com/ which will handle any of ANSI, DOS, Unicode or UTF-8 encoding. It identifies the encoding automatically fromt he contents and allows you to change it using Save As... HTH, Rob "David Eason" <[EMAIL PROTECTED]> wrote in message

Re: Remove some, not all \n from a text block

2003-01-09 Thread Rob Dixon
Hi Alan How about: my $last = undef; while (<>) { next unless defined $last; chomp $last unless /^\./; print $last; } continue { $last = $_; } print $last; HTH, Rob "Alan C." <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:

Re: hash & arrays

2003-01-09 Thread Jenda Krynicky
From: "Jerry Preston" <[EMAIL PROTECTED]> > I do not understand what I am doing wrong. I can pass an hash this > way and not an array using the following: > >require Exporter; > >our @ISA = qw(Exporter); >our @EXPORT = qw(); >our @EXPORT_OK = qw( @T_AREA ); >our @EXPORT_OK =

Re: Remove some, not all \n from a text block

2003-01-09 Thread John W. Krahn
"Alan C." wrote: > > Hello, Hello, > It's now a previously formatted text block with line breaks at every 70 > characters width. > > And the block's first line begins with a leading period or dot as well > as approximately every third line thereafter begins with a leading > period or dot. > >

Re: CRLF vs LF questions

2003-01-09 Thread Jenda Krynicky
From: "David Eason" <[EMAIL PROTECTED]> > Q1. For Windows, does anyone know of a Windows Explorer add-on that > makes Perl source files with CR-LF terminated lines appear in a > different color or something so I can easily see they need to be > corrected? I doubt anything like this does (or ever w

RE: hash & arrays

2003-01-09 Thread wiggins
You are resetting (clearing) @EXPORT_OK. Either you need to set it all at once or push to it (though I don't know if this latter works, should). See inline. On Thu, 9 Jan 2003 06:26:01 -0600, "Jerry Preston" <[EMAIL PROTECTED]> wrote: > Hi!, > >

Re: File Handle?

2003-01-09 Thread wiggins
On Thu, 09 Jan 2003 06:36:25 -0500, Mark Goland <[EMAIL PROTECTED]> wrote: > How about, > > print "its a file handle\n" if ( fileno($FH) ); > This will only work if the fileno is not 0, and STDIN's fileno is 0. Could be a problem if looking for

RE: Comparing Apples and Oranges

2003-01-09 Thread NYIMI Jose (BMB)
C:\>perldoc -q intersection Found in C:\Perl\lib\pod\perlfaq4.pod How do I compute the difference of two arrays? How do I compute the intersect ion of two arrays? Use a hash. Here's code to do both and more. It assumes that each element is unique in a given array:

Re: Comparing Apples and Oranges

2003-01-09 Thread Sudarshan Raghavan
Bob Williams wrote: I have two lists. List 1 is the control list containing: Apple, Orange, Lemon, Tangerine, and Grape. List 2 contains Apple, Tangerine, Grape, and Banana. I need a script that compares the two lists and will eliminate banana from list 2 because banana is not in the control L

Weekly list FAQ posting

2003-01-09 Thread casey
NAME beginners-faq - FAQ for the beginners mailing list 1 - Administriva 1.1 - I'm not subscribed - how do I subscribe? Send mail to <[EMAIL PROTECTED]> You can also specify your subscription email address by sending email to (assuming [EMAIL PROTECTED] is your email address):

Comparing Apples and Oranges

2003-01-09 Thread Bob Williams
I have two lists. List 1 is the control list containing: Apple, Orange, Lemon, Tangerine, and Grape. List 2 contains Apple, Tangerine, Grape, and Banana. I need a script that compares the two lists and will eliminate banana from list 2 because banana is not in the control List 1. The script wil

Compariing Apples and Oranges?

2003-01-09 Thread Bob Williams
List 1 is the control list containing: Apple, Orange, Lemon, Tangerine, and Grape. List 2 contains Apple, Tangerine, Grape, and Banana. I need a script that compares the two lists and will eliminate banana from list 2 because banana is not in the control List 1. The script will not add Orange to

Re: uploading and downloading files to MySQL

2003-01-09 Thread Vitaliy Babiy
I don't think it's good idea to store files in DB. Especially big files like music... The common way is to store path_to_files in DB "Mariusz" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, I found some info on how to upload files into a directory on the

Re: check file existence

2003-01-09 Thread LaVei
Alex Cheung Tin Ka wrote: > > Dear All, > I have a problem on using CGI to check the file existence in a directory. Here >is my code > > $workDir = "/usr/local/home/tkcheung/systemadmin/singlesar/Report"; > $path = "tulisar030108.rpt"; > $notAvailabe = 0; ### Must be named $notAvailable :-)

Re: check file existence

2003-01-09 Thread Vitaliy Babiy
Try this unless (-f $a) { $notAvialible = 1 } = "Alex Cheung Tin Ka" <[EMAIL PROTECTED]> wrote in message 021501c2b791$0c935bc0$[EMAIL PROTECTED]">news:021501c2b791$0c935bc0$[EMAIL PROTECTED]... Dear All, I have a problem on using CGI to ch

Remove some, not all \n from a text block

2003-01-09 Thread Alan C.
Hello, It's now a previously formatted text block with line breaks at every 70 characters width. And the block's first line begins with a leading period or dot as well as approximately every third line thereafter begins with a leading period or dot. How do I rid the block of line breaks on ev

CRLF vs LF questions

2003-01-09 Thread David Eason
Q1. For Windows, does anyone know of a Windows Explorer add-on that makes Perl source files with CR-LF terminated lines appear in a different color or something so I can easily see they need to be corrected? Q2. Are there any Linux versions of Perl that "don't care" whether the source file ends in

hash & arrays

2003-01-09 Thread Jerry Preston
Hi!, I do not understand what I am doing wrong. I can pass an hash this way and not an array using the following: require Exporter; our @ISA = qw(Exporter); our @EXPORT = qw(); our @EXPORT_OK = qw( @T_AREA ); our @EXPORT_OK = qw( %T_IDS ); where @T_AREA = ( "", "NORTH", "SOUT

Re: check file existence

2003-01-09 Thread Rob Dixon
Hi Alex It seems you have a typing error, see in-line. However I don't see how this would cause your problem. I would make sure you have entered your path and file name correctly. (How about copying and pasting directly from a directory listing?) Apart from that, how about writing your code as:

  1   2   >