RE: pattern matching question

2008-09-22 Thread Dave
d). Hope this helps. Dave -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

RE: regex count

2008-09-23 Thread Dave
Hello Stephen, I think the problem might be with your regular expression and not $x. If your regular expression does not match the current line then every line will be skipped. What does the line that is being processed look like? Dave -Original Message- From: Stephen Reese [mailto

learning perl

2002-02-20 Thread Dave
n my own system. Thanks. Dave -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

group

2003-12-25 Thread dave
I've made a group called everyone. It has its own Sub-directory, "/home/everyone". I have 3 users in the group. Do I have to do anything else so everyone can share that Sub-directory? Mandrake 9.2. Thanks in advance. -- Dave Pomeroy K7DNP South Eastern Washington -- To

wrong group

2003-12-25 Thread dave
Sorry for my last post I thought I'd sent that to Linux-newbie. -- Dave Pomeroy K7DNP South Eastern Washington -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

how to upload image in perl

2003-03-20 Thread Dave
Hai , I have a problem uploading images with perl. I have HTML code within perl. When i just link the image useing the link tag It doesnt work. I tried giving the path ../search.gif. Is there any other way to upload the image. Thanks in advance, - With Y

RE: Substitution Problem

2001-06-08 Thread Dave Newton
e substitution doesn't work. Clear as Mud?? Any ideas? Once I fixed an issue like this (because it suited the problem well) by checking to see how many values I got back from the split and doing things based on that number; perhaps that would work for you. Dave -- Dave Newton, [EMAIL PROTECTED]

RE: if then else

2001-06-09 Thread Dave Newton
;}}; = instead of eq (string comparison), and in any case even using the wrong operator you'd have wanted == (equality test) instead of = (assignment operator). Just to start a formatting flamefest ;) I would have written this like this: if ($ENV{'HTTP_REFERER'} eq "") {

RE: Understanding Randal's answer

2001-06-09 Thread Dave Newton
supposed to be a secret. I've not been able to come up with any reasonable CGI that would be creating a path that the user has any control over; why would one want to do that? Dave

RE: Understanding Randal's answer

2001-06-10 Thread Dave Newton
ed "generic" user access. > Another example is web-based email, which allows you to create multiple folders. Sure, but when we did that they were based off of a root and we checked for ..'s to avoid path... uh... backstepping. Dave

utf8 and uc()

2001-06-10 Thread Dave Neill
./x.x line 6. Malformed UTF-8 character (unexpected non-continuation byte 0x64 after start byte 0xf6) in uc at ./x.x line 6. foo Söderkulla; FOO SKULLA I would imagine it has something to do with the assignment to $foo being made in a byte orientation and that I need to do some encoding to utf8 on the string before assignment. Any pointers? Thanks, Dave

Re: extracting substr

2001-06-11 Thread Dave Cross
n be a bit more complex that that tho'. The first diit in a set of three can only be 1 or 2, if the first digit is 2 then the second one can only be 1 to 5, if the second digit is 5 then the third can only be 1 to 5. Of course, trying to cope withthat makes the regex far more complex and you might think it's too much extra effort for too little gain :) Dave...

Re: reading the next line from a file

2001-06-13 Thread Dave Cross
read every line, but only process every 10th one. Something like this should do it: while () { next unless $. % 10; # skip line unless it's a multiple of 10 # Do whatever processing you want # The line is in $_ } hth, Dave...

RE: A Term::ReadKey question -- keep cursor put!

2001-06-13 Thread Dave Newton
Bear in mind that without any sort of delay it's unlikely you'll be able to see any of this occuring. Ah, the good old days, where a 300-baud modem was fast and little spinny cursors were still interesting. *sigh* Dave -- Dave Newton, [EMAIL PROTECTED]

Re: reading the next line from a file

2001-06-13 Thread Dave Cross
eep a count. Perl does that for you - it's called $. Dave... -- Don't dream it... be it

Re: Installed Modules

2001-06-13 Thread Dave Watson
t;; } or pmtools http://language.perl.com/misc/pmtools-1.00.tar.gz -- Dave Watson

RE: use of split command - concession

2001-06-14 Thread Dave Newton
at version of perl (not having seen the source since... well, waaay too long ago... I don't know how abstracted things like that are) and b) the underlying OS. Dave

RE: A Term::ReadKey question -- keep cursor put!

2001-06-14 Thread Dave Newton
> He'd never seen the spinny cursor and was quite impressed - quite sad really! *grin* I'll admit they're cute :) Great story though; I'll have to remember that as an easy way to impress people. Dave

Re: Beginer...Any free resources for Learning Perl

2001-06-14 Thread Dave Cross
erl community. If they want to make a little (and it's really not very much) money back by writing books then you should support their efforts and not rip them off by getting pirate copies like these. Dave... [this really _is_ a hot topic recently. this is the third place I've ha

Re: Update: Where to begin??!!??

2001-06-15 Thread Dave Cross
gt; $new_data .= > "$date|$time|$name|$street|$city|$state|$zip|$country|$email|$phone|$subscri > ption|\n"; # create a new line for each bingo number. > } > print FILE_OUT $new_data; > } hth, Dave...

Re: Update: Where to begin??!!??

2001-06-15 Thread Dave Cross
e () { # each line of file in turn appears in $_ } You can find much more info on it in the perlvar manual page. Dave... -- Don't dream it... be it

Re: Update: Where to begin??!!??

2001-06-15 Thread Dave Cross
gt; Third: > You should escape the pipes in the print statement: > "$date|$time|$name|$street|etc"; > Should be: |$date\|$time\|$name\|$street\|etc"; Greg, Your first two pieces of advice were spot on, but I can't see any reason why you'd want to escape pi

Re: Update: Where to begin??!!??

2001-06-15 Thread Dave Cross
On Fri, Jun 15, 2001 at 04:43:26PM -0400, Michael Wolfrom ([EMAIL PROTECTED]) wrote: > > Dave Cross wrote: > > > > > > #! usr/bin/perl > > > use strict; > > > > > > open (FILE_IN, "pslbingocard.dat")|| die "failed to open file

Re: Update: Where to begin??!!??

2001-06-15 Thread Dave Cross
can bite you. Only if you miss out the parenthesis around the parameters to 'open'. In this case || works just fine. Dave... -- .sig missing...

Re: $hash{$_}++

2001-06-18 Thread Dave Cross
quot;$_: $hash{$_}\n" } sort { $hash{$b} <=> $hash{$a} } keys %hash; hth, Dave... -- Don't dream it... be it

Re: Perl/Linnux/unix question

2001-06-19 Thread Dave Young
It all has to do with your shell. modern shells shouldn't kill your processes on logout. Do & to run it in the background (which also "disconnects" it from the current tty. if all else fails, man and look for nohup Hope that helps. Dave ...On Mon, 4 Jun 2001 [EMA

Re: Cannot get a connect to Mysql using DBI !!!!!!!!!!!

2001-06-20 Thread dave hoover
ABASE_NAME Is "products\@192.168.1.170:3306" really the name of your database? Looks like you should change it back to simply read "products," but keep your username and password as is (thrawn, rootroot). Give it a try (if you haven't already), I'm not sure if this w

Advice for Perl Class

2001-06-21 Thread dave hoover
me training money to learn more about whatever I want. I want to learn more about Perl and Networks and CGI. I live in the Chicago area and I need some recommendations about where I could find some excellent classes nearby. TIA = Dave Hoover "Twice blessed is help unlo

Re: Advice for Perl Class

2001-06-21 Thread dave hoover
If I were to fly out to Portland and take the track mentioned below, how much would that cost? I couldn't find the rates for these on the Stonehenge site. Feel free to email me directly at: [EMAIL PROTECTED] Thanks, --Dave Hoover --- "Randal L. Schwartz" <[EMAIL PROTECTED

Re: Online books

2001-06-22 Thread dave hoover
jaya kumaran wrote: > Is there any free online books availabe to learn > perl script? Here's about 50 of them: http://dmoz.org/Computers/Programming/Languages/Perl/Documentation/Tutorials/ HTH = Dave Hoover "Twice blessed is help unlooked for.

RE: Help please (any one)

2001-06-22 Thread Dave Neill
t; $fields[0],$fields[5], > > $fields[70],$fields[71],$fields[73],$fields[74],$fields[75], > $fields[76],$fields[77]; } > } > > close iscd; > close sortcode; > exit; You'll want to read up on regexp matching to make this condition more restrictive and to find out how to match your other conditions. Dave

Re: Telnet

2001-06-20 Thread Dave Young
$.02 US (fully refundable) --Dave On Wed, 20 Jun 2001, SAWMaster wrote: > Yes and no. You cannot do it with telnet, but you can get what you want by > using an x-term client and setting up the server box to allow x connections. > One commercial example of an X-Term client for a win

Re: sort by value?

2001-06-26 Thread dave hoover
HTH BTW, I got the sort answer from "Effective Perl Programming" by Joseph Hall, a book I HIGHLY recommend to beginners (such as myself) once they've worked through the Llama and given the Camel a few tries. = Dave Hoover "Twice bless

Re: sort by value?

2001-06-26 Thread dave hoover
Mark Bedish wrote: > Dave, > > >It looks to me that your hash %ch is empty. Your > >foreach will never begin because there is no list > to > >iterate. You need to assign keys & values to %ch. > > >When it is time to sort numerically, use the > s

Re: array slice question

2001-06-26 Thread dave hoover
a discussion that mirrors your predicament. I don't have time to read it right now, but maybe it will shed some light on the subject for you. http://groups.google.com/groups?hl=en&safe=off&th=94cd69e466afd840,11&start=0&ic=1 = Dave Hoover "Twice blessed is help

Re: arrays

2001-06-28 Thread dave hoover
to an array > so I can do something > with each different ServerName? Thank you everyone. > > Tyler Try this: - open(FILE, "httpd.conf"); while () { push(@server_names, $1) if /ServerName\s+(.*)/ } close FILE; - Now

Re: arrays

2001-06-28 Thread dave hoover
elements in @servernames To print out each of the elements, do this: foreach $name (@servernames) { print "$name\n"; } Another way to do the above is this: for (@servernames) { print "$_\n"; # when no placeholder variable is specified, by default the $_ variable is

Taint checking with -T

2001-06-29 Thread dave hoover
When I added -T to an existing Perl script, I got the error message: Too late for "-T" option at main.cgi line 1. Is this a common error message with -T? What am I doing wrong? You can get the source at: http://www.redsquirreldesign.com/soapbox = Dave Hoover "Twice

help with running -T

2001-06-29 Thread dave hoover
.00401 /usr/local/lib/perl5 /usr/local/lib/perl5/site_perl/sun4-solaris /usr/local/lib/perl5/site_perl) at tst line 3. BEGIN failed--compilation aborted at tst line 3. I can't figure out why this is happening. Can anyone help? = Dave Hoover "Twice blessed is help unlo

Re: Please remove

2001-06-20 Thread Dave Young
D.J.B. is quite the character.. ;) > I also have tried removal but I get this great little insulting remark that > could only have been produced by a 'secret loyal order of Unix programmers' > bit bombardier! > > Hi. This is the qmail-send program at onion.perl.org. > I'm afraid I wasn't able t

Re: creating columns on the fly

2001-07-05 Thread dave hoover
ase first to see if it's there, then based on the results, construct your SQL statement with UPDATE/INSERT accordingly. = Dave Hoover "Twice blessed is help unlooked for." --Tolkien http://www.redsquirreldesign.com/dave __ Do Y

Re: Another Newbie

2001-07-06 Thread dave hoover
hink that learning Linux would _necessarily_ make you a better Perl programmer, but I would definitely encourage you to install Linux on any computer you have at your disposal...it's a beautiful thing. = Dave Hoover "Twice blessed is help unl

Re: foreach examples/usage

2001-07-07 Thread dave hoover
n Perl. I'd suggest checking out http://learn.perl.org and purchasing one of their book suggestions. = Dave Hoover "Twice blessed is help unlooked for." --Tolkien http://www.redsquirreldesign.com/dave __ Do You Yahoo!? G

Re: Help with global variable

2001-07-09 Thread dave hoover
utine like this: return $input; You don't have to use $input, you could pass anything back. Now $test_return will hold whatever you returned! > } HTH = Dave Hoover "Twice blessed is help unlooked for." --Tolkien http://www.redsquirreldesign.com/dave __

Re: "the right way"

2001-07-09 Thread dave hoover
lly for some (like me) and has a nicer look (to me) because there are less brackets. = Dave Hoover "Twice blessed is help unlooked for." --Tolkien http://www.redsquirreldesign.com/dave __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/

Re: "the right way"

2001-07-09 Thread dave hoover
Paul wrote: > On Mon, Jul 09, 2001 at 09:44:57AM -0700, dave > hoover wrote: > > > I think it's a matter of style, but also one > should > > consider who will be maintaining this code in the > > future and whether they will be familiar with Perl > or &

Re: How do I set @INC?

2001-07-11 Thread Dave Hoover
mple: #!/apps/perl/5.6.0/bin/perl Just remember that if you're trying to test the script from the command line, rather than typing: % perl instead you would type % /apps/perl/5.6.0/bin/perl HTH = Dave Hoover "Twice blessed is help unlooked for." --Tolkien http://www.redsquirreldesign.com/dave

Re: How do I set @INC?

2001-07-12 Thread Dave Hoover
does little for you in terms of > choosing the correct interpreter for the script. I'm basically ignorant about perl in windows. This is good to know. Thanks for clearing things up. = Dave Hoover "Twice blessed is help unlooked for." --Tolkien http://www.redsquirreldesign.com/dave

RE: multiple entry/exit points

2001-07-12 Thread Dave Newton
osophy, > mainly for the sake of readability. Yowzah-I've found that w/o exceptions that having a wad of nested if's/etc. tend to make things _more_ unreadable. > Also, I was wondering if exiting prematurely like this from a program has > any adverse affects on the execution of the program. It'll stop the program ;) Dave

Re: IO::Socket:INET and broadcasting

2001-07-12 Thread Dave Watson
ygwin but gives me a "permission denied" > error in Mandrake 7.2 > Any clue? If you are trying to open a socket < 1024 you must have root privileges. -- Dave Watson

Re: removing white spaces

2001-07-17 Thread dave hoover
javier wrote: > It sounds a bit stupid but I don't know the way to > remove white spaces in a > string. > > $string = "No sé como quitar los putos spacios"; > and now? $string =~ s/ //g; Here's one way to do it. = Dave Hoover "Twice bl

Re: Removing spaces

2001-07-19 Thread Dave Neill
;s fore and aft variants that purports to be faster than the regex substitution. I haven't done any testing to verify performance on any of these. Dave A simple Q well i want to remove spaces if any in the beginning and end of a string. how to do this... .. -- To unsubsc

Re: Code Review Needed!

2001-06-29 Thread dave hoover
have received thus far has been very helpful. It's been a learning experience...particularly about taint checking! Thanks, --Dave --- dave hoover <[EMAIL PROTECTED]> wrote: > I would greatly appreciate ANY feedback anyone could > provide. The following page will provide details and

Code Review Needed!

2001-06-28 Thread dave hoover
I would greatly appreciate ANY feedback anyone could provide. The following page will provide details and a link to download the tarball. http://www.redsquirreldesign.com/soapbox TIA = Dave Hoover "Twice blessed is help unlooked for." --Tolkien http://www.redsquirreldesig

Re: y me

2001-08-03 Thread Dave Hoebe
d be handy troubleshooting :) Good-luck Dave - Original Message - From: "Peter" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, August 02, 2001 2:34 AM Subject: y me > hi all, > > i have a new script that i put in the same directory as > other wo

RE: a little help here please

2001-08-08 Thread Dave Newton
ere and at every script iteration check to see if "enough" time has passed to process the logfile portion of the script again. I like the first idea better-separate out the oddball and either cron (*nix), schedule (etc.), or sleep (any) it. Dave -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Frustrated installing modules!?!

2001-08-08 Thread Dave Newton
andom C Compiler, which generally includes a make-like utility, which in uSoft's case is (or at least was) nmake, which is why that shows up. Dave -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Reading backwards

2001-09-02 Thread Dave Arnold
msg; } push(@msg,$_); } > > My question is...can we read the file backwards. > If I could set the reading pointer to the end > of the file and then work my way back 40 entries. > and print...now that would make my day. > > anyone know of a way? There is a module on

Passing variables to subroutines

2001-04-28 Thread Dave Watkins
Hi All I am trying to pass a variable, a hash table and an array into a subroutine like so subroutine($variable, %hash, @array); and pick it up like so sub subroutine { my($variable, %hash, @array) = @_; but it seems the array isn't being passed, I can print the contents of the arra

Re: Passing variables to subroutines

2001-04-28 Thread Dave Watkins
Works like a charm Thanks At 09:57 PM 4/28/01 -0500, you wrote: >-BEGIN PGP SIGNED MESSAGE- >Hash: SHA1 > >On Sun, 29 Apr 2001, Dave Watkins wrote: > > > Hi All > > > > I am trying to pass a variable, a hash table and an array into a subroutine > &g

RE: installing perl

2001-05-30 Thread Dave Runkle
sages? Let us know how it goes, it should be an easy install, so give some more info so we can help diagnose. Dave > -Original Message- > From: Gil Tucker [ateliermobile] [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, May 30, 2001 1:10 AM > To: [EMAIL PROTECTED] > Sub

RE: perl ping script using cgi

2001-06-01 Thread Dave Palmer
user 'nobody' to do much of anything :) ./dave > -Original Message- > From: Mohan Kompella [mailto:[EMAIL PROTECTED]] > Sent: Friday, June 01, 2001 4:42 PM > To: [EMAIL PROTECTED] > Subject: perl ping script using cgi > > > Hello all, > > I was tryi

RE: perl ping script using cgi

2001-06-01 Thread Dave Palmer
Also... -T can be your friend, espcially with CGI ./dave > > Dave Palmer wrote: > > : Your working script is *definitely* the way you want to go... > its generally > : a no-no to ever give user 'nobody' (e.g. web server) access to > your shell > : (w

RE: RE: Records put into a hash - Beginner Question

2001-06-04 Thread Dave Newton
on? Instead of doing any indirection inside the loop it's handled in the key list generation. Am I totally hosed on how I thought this worked? Dave

RE: Anyone know to how use subroutines to add or multiply numbers :How would I modify my file:

2001-10-18 Thread Dave Storrs
y( @ARGV ); > print "The product is :$rtn"; > } > > sub add { > my @list = @_; > my $sum = 0; > $sum += $_ foreach (@list); } # <= This was missing > > sub multiply { > my @list = @_; > my $prod = 1; > $prod *= $_ foreach (@l

Re: XMLParser and Perl

2001-10-18 Thread Dave Storrs
matter what you need, there is probably a module that can help. Always check CPAN before writing it yourself. Dave On Thu, 18 Oct 2001, Trent A Stephens wrote: > I (a beginner in Perl) am looking for guidance on XML and Perl. I am > having to read in an XML file, parse it for specifi

Re: Unable to display output

2001-10-18 Thread Dave Storrs
perl -e 'print "Hello, World!"'; Or, put the following in a file: #!/usr/bin/perl print "Hello, World!"; Make sure execute permissions are set on the file, then run the file. You will notice that neither of these examples i

RE: Very Urgent...

2001-10-19 Thread Dave Newton
> Where can I get more information on How to test(QA) Website > or client server application using Perl-win32::GuiTest. My understanding was that win32::guitest was for testing windows applications, not websites? Dave -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comma

Need help with deleting from hash table

2001-10-20 Thread Dave Turner
First off, thanks to all who offered help with my trying to count the number of items passed in a CGI script. I finally figured out I had my logic wrong and it doesn't matter how many element's I'm passing, but... My problem now is that I can't get items deleted from a hash table. My code is a

Need help with CGI module

2001-10-28 Thread Dave Turner
I have scanned the docs and can't seem to find the answer to this anywhere. I want to change the color of the text and the font size on a web page using CGI:pm. my code looks like: $q->h2( "Something witty here"); but I'd like to have the flexibility to do Can anyone point me to a reference

RE: off topic - javascript question

2001-10-29 Thread Merritt, Dave
I believe the format of the javascript open method should be: Also, you don't need to put the tags around the <body> tag Dave Merritt [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [<A HREF="mailto:[EMAIL PROTECTED]">mailto:[EMAIL PROTECTED]

Re: Problem using IF with AND

2001-10-29 Thread Dave Turner
I think ( and there's plenty who will tell you if I'm wrong... lol ) that you need to put it as: if (($client ne $newclient) && ($method ne $newmethod)) { // blah blah blah } Otherwise I think it doesn't bother to look at the second if the first fails. Hope that helps. At 10:28 PM 10

Re: Access MS SQL using DBI / DBD

2001-11-01 Thread Dave Storrs
Hi Pathi, There is an excellent book from O'Reilly _Programming the Perl DBI_. It has a leopard on the cover, and it should answer every question you could possibly desire concerning the DBI. HTH, Dave On Tue, 30 Oct 2001, Erramilli, Pathi (P.) wrote: > Hi, >

Re: merging two hashes together?

2001-11-03 Thread Dave Storrs
et around it in a LOT of ways...you can use array references to store your values (meaning that one key can hold as many values as you want, hidden inside the array ref), and/or you can use fancy object-oriented magic to make a magical data structure that pretends to be a hash but can have dupli

Re: HOw do I create a package:

2001-11-03 Thread Dave Storrs
With all due respect, this list is here to help beginner perl programmers deal with programming problems, not to do people's homework for them. (The 'hp.com' address (which prominently dispalys an ad for "hp's online university") is a bit of a giveaway.) Read thi

OT: dB pooling in Perl (was Re: Perl with Java)

2001-11-04 Thread Dave Storrs
isn't something I've done before, so I don't have a ready answer on where to look. Mason? I know that version 2 of Apache/mod_perl will provide this, but that isn't out yet and who knows when it will be. Any suggestions on where else to look? Dave On Sat, 3 Nov 2001, Greg Mec

Re: regexp with $ARGV

2001-11-04 Thread Dave Storrs
_ and replace any other matches you find." I think what you want instead is this: $ARGV[0] = "($ARGV[0])"; Dave On Sun, 4 Nov 2001, Martin Karlsson wrote: > Could anyone please show me the way to think here? > > If I execute a script with an argument, e.g

(Slightly OT) RE: terminating input

2001-11-04 Thread Dave Storrs
ey always thank me later, when they need to maintain my code. Rant mode off. We know return you to your regularly scheduled list. Dave -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Off-Topic (200%) - Where are you from?

2001-11-10 Thread Dave Turner
At 06:48 PM 11/10/01 +0100, you wrote: >Hi, >Smauel Molina Vidal >Industrial Engineer student @ University of Seville, Seville, Spain >(quite far from the west coast :-) San Mateo, CA --Very west coast... :-) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: regexp with $ARGV

2001-11-08 Thread Dave Storrs
ve heard people say that it also served as a good introduction to programming in general. Dave -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: vars as key/value in a hash

2001-11-09 Thread Dave Storrs
teration of the loop to the other, because you aren't reinitializing the hash. HTH, Dave On Thu, 8 Nov 2001, Brett W. McCoy wrote: > On Thu, 8 Nov 2001, Tyler Cruickshank wrote: > > > open(NAMES, "d://perl/avalanche/names.txt") || die "Cant open names

Re: SecureCRT + Perl

2001-11-09 Thread Dave Storrs
Um...not sure what you're asking for here. I use SecureCRT all the time (using it right now, in fact), and I do in fact write Perl while securely telnetted into various machines. What do you want to do? Dave On Thu, 8 Nov 2001, A. Rivera wrote: > Has anyone tried to use Secure

Re: installing modules

2001-11-09 Thread Dave Storrs
the following line at the top of the script: use Foo; If I created a directory in /usr/local/lib/perl5/site_perl named 'Foo/' and in that directory I put a file named 'Bar.pm', then I could use that module by doing: use Foo::Bar; Hope this helps. Dav

Re: SecureCRT + Perl

2001-11-09 Thread Dave Storrs
Ah. Ok, now I understand. Sorry, no experience with such things. Dave On Fri, 9 Nov 2001, A. Rivera wrote: > I'm talking about using scripts in the tradition of clients like Telemate, > Telix, ZOC. Where the script rests on the client side, and it is used to > interact w

Re: Off-Topic (200%) - Where are you from?

2001-11-12 Thread Dave Rankin
Providence, in the tiny state of Rhode Island -Dave -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Off-Topic (200%) - Where are you from?

2001-11-13 Thread Dave Storrs
At the moment, New York, a.k.a. "Terrorist Target Number #1" :/ Dave -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: installing modules

2001-11-13 Thread Dave Storrs
l/myMod' ; > use Bar ; > > Thanks, > Rahul Yep, that will certainly do it, and is often the best way. Another way to do it described here (ref PERL5LIB and PERLLIB vars): http://www.perldoc.com/perl5.6/pod/perlrun.html#ENVIRONMENT Dave -- To unsubscribe, e-mail: [EMAIL

RE: What was your first PERL script (was Off-Topic (200%) - Where are you from?)

2001-11-13 Thread Dave Turner
Mine just got completed after about 6 months of on and off work. It is a CGI app to allow a merchant to update items for sale via a web page. Adds them on one side, and check boxes allow you to choose which to get rid of on the other side. It writes items to a small file -- it's too small a nu

RE: What was your first PERL script (was Off-Topic (200%) - Whereare you from?)

2001-11-14 Thread Dave Storrs
hired the original team, including me, back a year later to expand it. It was pretty cool too...it could manage 100,000s of docs, could do fax, email, etc. And this was all back in 1996 or so.) Dave On Tue, 13 Nov 2001, Dave Turner wrote: > Mine just got completed after about 6 months of on

Re: Updating a hash using a refernece?

2001-11-14 Thread Dave Storrs
hash = ( SHELL => '/bin/csh' ); my $rh_hash = \%hash; my $rs_element = \($hash{SHELL}); print $hash{SHELL}, "\n"; $rh_hash->{SHELL} = 'blog'; print $hash{SHELL}, "\n"; $$rs_element = 'wurzle'; print $hash{SHELL}, "\n"; Outputs: /bin/csh blog wurzle Dave -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: What is "bubble sort"?

2001-11-16 Thread Dave Storrs
ate cases (quicksort is an example) - the more you know about your data ((un)sorted/string/number/limited range), the better you can do at choosing algorithms that are closer to optimal *for your data* > Thoughts? Anyone done some testing on actual data? What's that timing m

RE: Populating a referenced hash

2001-11-16 Thread Dave Storrs
This may or may not solve your problem, but Name your sub something other than 'ref'. Ref is a reserved word in Perl. (perldoc -f ref for details on what it does) Dave > > > --arg.pl--- > > > #/usr/plx/bin/perl -w > > >

RE: Modules

2001-11-16 Thread Dave Storrs
> > In practical daily use, use(); is preferred as since it compiles the > > module as soon as it sees 'use Foo::Bar;' before moving on, this will > > catch errors and scope conflicts far sooner than if you use require(); > > There aren't many good reasons to use require, at least I > > can't thin

RE: Populating a referenced hash

2001-11-16 Thread Dave Storrs
o get different results from the two calls, right? Dave > > --Chuck > > > > > > --arg.pl--- > > > > > #/usr/plx/bin/perl -w > > > > > > > > > > use strict; > > > > > > > > >

Re: Time Related

2001-11-16 Thread Dave Storrs
day, and you know that each log contains information only from a specific hour of the day. The first approch is more flexible, the second may be easier. Dave On Fri, 16 Nov 2001, Najamuddin, Junaid wrote: > Hi, > > How can I pull data from a log file for last hour or so > I wrote a

Re: capture song title

2001-11-16 Thread Dave Storrs
ll ever need to look at this code again. :> Dave -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Pattern matching

2001-11-21 Thread Dave Rankin
Hello, When reading from like that, you're going to want to use chomp to remove the \n line character at the end of what the user inputs. Right now, you're actually doing a match for "$build\n". So, you could change "$build=;" to "chomp($build=);" or

Re: directories

2001-11-21 Thread Dave Rankin
You can use the -d operator to test for a directory. print "Found directory!\n" if (-d "/path/to/directory"); (Just make sure you use the c:\\path\\to\\directory format on Windows.) HTH. -Dave On Wednesday 21 November 2001 10:41 am, [EMAIL PROTECTED] wrote: > what i

Re: retrieving array/data from a pdf file and putting everything in a excel file

2001-11-21 Thread Dave Rankin
Hi, You might want to check out the PDF modules at cpan, particularly PDF::Core and PDF::Parse. Also, here's an article that should help with the excel part: http://www-106.ibm.com/developerworks/library/l-pexcel/ These should be a starting point anyway. HTH. -Dave On Wednesd

Re: directories

2001-11-21 Thread Dave Storrs
d '/usr/bin/home' ) { ... stuff ... } The -e test checks to see that $dirpath exists, -d checks that it is a directory. The underscore means "whatever the last filetest operated on, operate on that same thing". Read more about it here: http://www.perldoc.com/perl5.6/pod/func/

  1   2   3   4   5   6   >