question about cgi-lib.pl

2002-07-23 Thread Michal Simovic
I'd like to ask how to tell perl script to use cgi-lib.pl and where cgi-lib.pl should be placed. __ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: question about cgi-lib.pl

2002-07-23 Thread Connie Chan
Hmm... if I don't remember it wrongly, cgi-lib.pl is some sort of old Perl(4) code. Now, you better use CGI. Rgds, Connie - Original Message - From: Michal Simovic [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 23, 2002 4:28 PM Subject: question about cgi-lib.pl I'd

Members area

2002-07-23 Thread Jonathan
I would like to allow members to manage their accounts on-line. I need a resource that explains each 'security' method, and discusses the pros and cons of each. Do you know of any books or tutorials that do this? Or at least provide a list of the different options?

RE: Running CGIs offline

2002-07-23 Thread tommy
Not sure what you're after, but to run CGI's offline, you can just: 1) Install a Perl distribution (Indigo Perl or Active Perl are simple) 2) Whack Apache on your box (comes as binary for most OS's) - I found the Bindows version simple to install and run. - Just tell it where your perl

Re: question about cgi-lib.pl

2002-07-23 Thread David T-G
Michal -- ...and then Michal Simovic said... % % I'd like to ask how to tell perl script to use % cgi-lib.pl and where cgi-lib.pl should be placed. 1) I agree with Connie; you're probably using really old code. 2) To use a module, just use modulename ; and away you go. 3) To use code

Re: Buffer output?

2002-07-23 Thread zentara
On Mon, 22 Jul 2002 10:40:29 +0300, [EMAIL PROTECTED] (Octavian Rasnita) wrote: Hi all, I've seen the following line in more Perl scripts and even in some Perl books, but it wasn't very well explained. $|=1; ## Don't buffer output What does it mean to buffer output? Which is the

RE: Running CGIs offline

2002-07-23 Thread Scot Robnett
Although these are good suggestions, I think they miss the original intention. We were looking for something that we could distribute on CD and have it run, regardless of whether the user had Perl or a web server installed on their workstation. And then Bob Showalter said: -Original

RE: Running CGIs offline

2002-07-23 Thread Bob Showalter
-Original Message- From: Scot Robnett [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 11:26 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Running CGIs offline Although these are good suggestions, I think they miss the original intention. We were looking for

my mailbox is filling with all posted messages, what to do?

2002-07-23 Thread Michal Simovic
I'm sorry for bugging you but I don't understand (I'm not a native english speaker) what should I do if I only wish to receive answers to my questions to my mailbox and not all the others that were posted. could somebody explain? thank you __ Do

RE: Running CGIs offline

2002-07-23 Thread Timothy_Spalding
Right. I have a deep faith that a skilled Unix hacker could run CGIs on a toaster. But I'm looking for something for someone who has trouble running toast on a toaster. Here's something one could do, at least with MacPerl 1. create Macperl runtime 2. have the HTML link to this runtime 3. the

RE: Running CGIs offline

2002-07-23 Thread Timothy_Spalding
Aha! This seems to be the answer. Check out MicroWeb, a PC product that promises to Create a working web site on a CD-ROM. It's from the same company as IndigoPERL. http://www.indigostar.com/microweb.htm Still no Mac solution, alas.

RE: Running CGIs offline

2002-07-23 Thread tommygunner
Not sure what you're after, but to run CGI's offline, you can just: 1) Install a Perl distribution (Indigo Perl or Active Perl are simple) 2) Whack Apache on your box (comes as binary for most OS's) - I found the Bindows version simple to install and run. - Just tell it where your perl

Web tools

2002-07-23 Thread Samuel Yip
Hi, I am new to perl and would like to use perl to do the following: 1. Prompt the user for a IP address. 2. Ping the IP address from the web server and 3. Print out the result to the user on the browser. Anyone knows how should I do it ? Thks -- To unsubscribe, e-mail: [EMAIL PROTECTED]

Re: Web tools

2002-07-23 Thread perl-dvd
Samuel, Well, you could hop on cpan.org and find yourself a module that will do the ping for you, or you could use a less proper method like the following: - # pretend you got $ipaddress through CGI.pm or something like that print Content-Type:

RE: Running CGIs offline

2002-07-23 Thread Naika - EV1
I'm not a pro at this or anything but you can always link the cgis to the web and place instructions that state that an internet connection is required. I'm kinda wondering if the script could track the disks being used as well. Naika http://naikaonline.com -- To unsubscribe, e-mail:

Re: my mailbox is filling with all posted messages, what to do?

2002-07-23 Thread Connie Chan
- Original Message - From: Michal Simovic [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 23, 2002 11:54 PM Subject: my mailbox is filling with all posted messages, what to do? I'm sorry for bugging you but I don't understand (I'm not a native english speaker) So.. me

Checking if a file is downloading

2002-07-23 Thread Octavian Rasnita
Hi all, I want to check if a certain file is downloading in this moment by a page visitor. Is it possible with Perl? I want to tell me true if the file is in the downloading process, and false if the download has finished. Thank you. I hope it is possible. Teddy Center: http://teddy.fcc.ro/

Re: Checking if a file is downloading

2002-07-23 Thread Wiggins d'Anconia
There may be a direct way but I am not aware of it. As a proposed solution you could have the user call a perl script that has the following steps: 1) create a lock file (or something similar) 2) open the file that is to be downloaded 3) print the proper header for that file type 4) print the

Re: my mailbox is filling with all posted messages, what to do?

2002-07-23 Thread Yasen Petrov
I would highly recomend you to configure an newsgroup reader like Outlook Express. I use it - it's excellent. This way you can download only the headers of the messages and preview those which look well to you. By the way, are you from Yougoslavia? Here's a neighbor guy. Michal Simovic [EMAIL

Re: sorting %hash entries

2002-07-23 Thread dan
ok.. that worked, now how about if i wanted it to go the other way.. from most to least? dan David Wagner [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Here is one shot: %usernum = ( server.one.com, 15, server.two.com, 5, server.three.com, 14,

Net::SMTP

2002-07-23 Thread Manya
Hi I am new to Perl. My prog. goes like this use Net::SMTP --- it gives the message can not locate Net/SMTP.pm in PATH What is wrong? Please help Manya --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.350 / Virus

Re: Net::SMTP

2002-07-23 Thread Sudarshan Raghavan
On Tue, 23 Jul 2002, Manya wrote: Hi I am new to Perl. My prog. goes like this use Net::SMTP --- it gives the message can not locate Net/SMTP.pm in PATH Have you installed Net::SMTP, it comes as a part of libnet package. If you have installed it check that the install

Re: sorting %hash entries

2002-07-23 Thread Sudarshan Raghavan
On Tue, 23 Jul 2002, dan wrote: ok.. that worked, now how about if i wanted it to go the other way.. from most to least? foreach my $MyId (sort {$usernum{$a} = $usernum{$b}} keys (%usernum)) { print $MyId\n; } This will print server.two.com server.four.com server.three.com server.one.com

Re: Position 251 ???

2002-07-23 Thread Konrad Foerstner
Okay, know I tried it and it works perfectly! Thanks! On Mon, 22 Jul 2002 15:37:03 -0400 Bob Showalter [EMAIL PROTECTED] wrote: -Original Message- From: Konrad Foerstner [mailto:[EMAIL PROTECTED]] Sent: Monday, July 22, 2002 2:19 PM To: [EMAIL PROTECTED] Subject: Position

Comparing Arrays

2002-07-23 Thread Merritt Krakowitzer
Hi I would like to know how to compare 2 arrays. I have 2 arrays and I would like to compare the contents of the data. It doesn't matter in which order the data is stored so long as its the same. So comparing the bellow should read true, but if they didn't match it would be false. my @foo =

Re: Comparing Arrays

2002-07-23 Thread Tor Hildrum
[EMAIL PROTECTED] wrote: Hi I would like to know how to compare 2 arrays. I have 2 arrays and I would like to compare the contents of the data. It doesn't matter in which order the data is stored so long as its the same. So comparing the bellow should read true, but if they didn't match

Re: sorting %hash entries

2002-07-23 Thread John W. Krahn
Dan wrote: ok.. that worked, now how about if i wanted it to go the other way.. from most to least? my @sorted = sort { $usernum{$b} = $usernum{$a} } keys %usernum; John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

Re: Comparing Arrays

2002-07-23 Thread John W. Krahn
Merritt Krakowitzer wrote: Hi Hello, I would like to know how to compare 2 arrays. perldoc -q array Found in /usr/lib/perl5/5.6.0/pod/perlfaq4.pod [snip] How do I compute the difference of two arrays? How do I compute the intersection of two arrays? [snip] How do I

Re: How to make @array2 use values of @array1?

2002-07-23 Thread David T-G
Chris -- ...and then chris said... % % I have two variables (@array1 and @array2). @array1 will be % initialized with a list of values. Is it possible to declare @array2 % in such a way that it will reference @array1? Do you want @array2 to be a *copy* of @array1 when this is all done, or

RE: Interpreter

2002-07-23 Thread Marco Antonio Valenzuela Escárcega
tal vez te sirva leer esto: http://www.perl.com/pub/a/2001/06/13/recdecent.html es un tutorial de Parse::RecDescent, y como ejemplo se implementa un mini-lenguaje, y se sugieren algunas ideas acerca de que se le puede agregar. con suerte y este ejemplo es suficiente como base de tu proyecto.

Remove 4 last letters

2002-07-23 Thread David Samuelsson (PAC)
This should be really simple, just use a regexp to remove the 4 last letters from a variable. $variable =~ /\S\S\S\S$/; print $variable; but this doesnt remove the 4 last letters when i run it, i think i am just getting tired here and cant see why, what is the right way to do it? :) //Dave

RE: regexp matching across newlines

2002-07-23 Thread Bob Showalter
-Original Message- From: David T-G [mailto:[EMAIL PROTECTED]] Sent: Monday, July 22, 2002 8:13 PM To: perl beginners Cc: David Newman Subject: Re: regexp matching across newlines David -- ...and then David Newman said... % % Yes, but your *. should be .* to work. When

Re: Remove 4 last letters

2002-07-23 Thread Chad Kellerman
Dave, I did it this way $variable = substr($orig_variable,0,length($orig_variable)-2); I actually only removed the last 2 characters but I don't see why you could not put a 4 and remove last four.. I am sort of new at perl but I did get the above to work. I needed to drop off 2

Re: Remove 4 last letters

2002-07-23 Thread Sudarshan Raghavan
On Tue, 23 Jul 2002, David Samuelsson (PAC) wrote: This should be really simple, just use a regexp to remove the 4 last letters from a variable. $variable =~ /\S\S\S\S$/; This just checks if your patter \S... matches with the contents of $variable. This should be $variable =~ s/\S\S\S\S$//

RE: How to make @array2 use values of @array1?

2002-07-23 Thread Bob Showalter
-Original Message- From: nkuipers [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 2:13 AM To: [EMAIL PROTECTED] Subject: RE: How to make @array2 use values of @array1? What I am about to raise, I do so more out of wanting someone to educate me than disagreeing for

Re: Remove 4 last letters

2002-07-23 Thread Connie Chan
$var =~ s/.{4}$//; Rgds, Connie - Original Message - From: David Samuelsson (PAC) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 23, 2002 8:00 PM Subject: Remove 4 last letters This should be really simple, just use a regexp to remove the 4 last letters from a

RE: Can IPC work?

2002-07-23 Thread Bob Showalter
-Original Message- From: Mayank Ahuja [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 3:15 AM To: Perl Subject: Can IPC work? Hi All, Please go through the following scenario: A perl script has been invoked from shell A. Within the perl script, I open a new

RE: Comparing Arrays

2002-07-23 Thread Bob Showalter
-Original Message- From: Merritt Krakowitzer [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 3:48 AM To: Beginners Subject: Comparing Arrays Hi I would like to know how to compare 2 arrays. I have 2 arrays and I would like to compare the contents of the data. It

Re: regexp matching across newlines

2002-07-23 Thread David T-G
Bob, et al -- ...and then Bob Showalter said... % % -Original Message- % From: David T-G [mailto:[EMAIL PROTECTED]] ... % Whoops! No it won't -- .* is greedy! % % You need something more like ... %/(p1)[^(p2)]*(p2)/g ; ... % This does not match on input data like: % %

Re: Passing variable to sed command.

2002-07-23 Thread drieux
On Monday, July 22, 2002, at 02:38 , kent ho wrote: Thanks, Kent I will admit that I pulled out my copy of the O'Reilly Sed and Awk - which I would recommend if you are going to be in that space long. Alternatively, you might look into perl open(IN, $file) or die unable to open

Replace last # with \n

2002-07-23 Thread Busse, Rich
I have a string that looks like Operator Overview#PGM#Report about all configured operators#/opt/OV/bin/OpC/call_sqlplus.sh all_oper# I want to replace the last # with a newline. I've come up with a few ideas like substr ($_, rindex ($_, #), 1) = \n ; or substr ($_, length ($_) - 1, 1) = \n ;

Re: Replace last # with \n

2002-07-23 Thread Tor Hildrum
[EMAIL PROTECTED] wrote: I have a string that looks like Operator Overview#PGM#Report about all configured operators#/opt/OV/bin/OpC/call_sqlplus.sh all_oper# I want to replace the last # with a newline. I've come up with a few ideas like substr ($_, rindex ($_, #), 1) = \n ; or

Re: Replace last # with \n

2002-07-23 Thread Tanton Gibbs
if you want to use s/// you can say s/(.*)#/$1\n/; - Original Message - From: Busse, Rich [EMAIL PROTECTED] To: Perl Beginners [EMAIL PROTECTED] Sent: Tuesday, July 23, 2002 9:00 AM Subject: Replace last # with \n I have a string that looks like Operator Overview#PGM#Report about

FW: Replace last # with \n

2002-07-23 Thread Busse, Rich
Doh! I forgot about using $! All I need is s/#$/\n/ ; Thanks to Tor Tanton for getting my brain in gear... -Original Message- From: Busse, Rich Sent: Tuesday, 23 July, 2002 09:00 To: 'Perl Beginners' Subject: Replace last # with \n I have a string that looks

Re: Perl on-line books

2002-07-23 Thread Jim Agnew
I just found out that some sites have pirated books. I don't know if this is so or not, I've been told this is possibly a pirated copy. Sams still have it for sale, I think. Apologies, Jim Jim Agnew wrote: There's perl in 21 days... found it by using google.

Curses-CursesWidgets-SCO Unix (why'd you think they call it curses?)

2002-07-23 Thread Doug Lentz
This may be a long shot, but I am trying to get Arthur Corliss's CursesWidgets 1.992 module to work on a SCO box. Must apologize first, I do not understand curses, no more than the average pig understands French. Server OS: SCO Open Server 5 (oxymoron, but we can't call it SCO Abandoned Server

Re: Remove 4 last letters

2002-07-23 Thread John W. Krahn
David Samuelsson wrote: This should be really simple, just use a regexp to remove the 4 last letters from a variable. $variable =~ /\S\S\S\S$/; print $variable; but this doesnt remove the 4 last letters when i run it, i think i am just getting tired here and cant see why, what is the

Re: Need help with package

2002-07-23 Thread drieux
On Monday, July 22, 2002, at 04:36 , chris wrote: Here is what I am doing use A; my $this = {}; bless $this; my $result = $this-A::sub1 (my $args); why pass in an uninitialized value??? that is scoped to pass out of existence also this blessed object gambit should be in the package

Re: Replace last # with \n

2002-07-23 Thread Jeff 'japhy' Pinyan
On Jul 23, John W. Krahn said: Rich Busse wrote: I want to replace the last # with a newline. I've come up with a few ideas $_ = reverse; s/#/\n/; $_ = reverse; Here's a (potential) Perl 5.8.1 way of doing it, which is likely to be faster than the sexeger (reversing approach above) method:

Re: How to make @array2 use values of @array1?

2002-07-23 Thread chris
What I am after: changes to one forces changes to other but could not make work What I ended up with that works: @{$this-{pkg_variable2}} = @{$this-{pkg_variable1}} Sample listing of my problem follows. use PkgA; $pkga = PkgA; my $this = new $pkga; print @{$this-{pkg_variable1}}; # this prints

Re: Remove 4 last letters

2002-07-23 Thread Connie Chan
$variable =~ s/\S\S\S\S$//; Heehee.. just for fun, what about if $variable = 123456\t8\t0 ? =) Rgds, Connie John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe,

Re: Can IPC work?

2002-07-23 Thread drieux
On Tuesday, July 23, 2002, at 12:14 , Mayank Ahuja wrote: [..] Putting it graphically, A | | |--- | | | B |(New Terminal) |[User sets a variable] | | (execution of the script continues once B is

RE: Comparing Arrays

2002-07-23 Thread Timothy Johnson
In the quick and dirty category, you can do something like this: (I'm trying to remember off the top of my head) ## my $result = ArrayCmp(\@array1,\@array2); #pass two array references sub ArrayCmp{ my($ref1,$ref2) = @_; my %tmp = ();

Re: question about replacing ^M

2002-07-23 Thread Chas Owens
On Mon, 2002-07-22 at 19:15, David T-G wrote: Desmond -- ...and then Desmond Lee said... % ... % A sample from the file looks like this: % % while ( $row = $db-sql_fetchrow($result) );^M % $db-sql_freeresult($result);^M^M $total_threads = %

RE: Comparing Arrays

2002-07-23 Thread Timothy Johnson
LOL yup. I knew someone would catch that. As Marvin would say, Back to the old drawing board. -Original Message- From: Jeff 'japhy' Pinyan To: Timothy Johnson Cc: 'Bob Showalter '; ''Merritt Krakowitzer' '; 'Beginners ' Sent: 7/23/02 8:48 AM Subject: RE: Comparing Arrays On Jul 23,

RE: Comparing Arrays

2002-07-23 Thread Bob Showalter
-Original Message- From: Timothy Johnson [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 11:41 AM To: 'Bob Showalter '; ''Merritt Krakowitzer' '; 'Beginners ' Subject: RE: Comparing Arrays In the quick and dirty category, you can do something like this: (I'm trying

Re: Need some concept about package

2002-07-23 Thread drieux
On Friday, July 19, 2002, at 05:09 , Peter Scott wrote: [..] hence why the 'OO' style is so popular with the my $thing = FOO::BAR-new(@arglist); my $this = $thing-get_this($with_that); and the only 'exported' method is the 'new'... Please don't confuse people. not my

RE: sorting %hash entries

2002-07-23 Thread David . Wagner
Switch the $a and $b and now you go to descending sequence: foreach my $MyId (sort {$b-[1] =$a-[1]} map{[$_,$usernum{$_}]} keys %usernum) { Wags ;) -Original Message- From: dan [mailto:[EMAIL PROTECTED]] Sent: Monday, July 22, 2002 17:55 To: [EMAIL PROTECTED] Subject: Re:

RE: Can IPC work?

2002-07-23 Thread Pritpal Dhaliwal
can they share variables using pipes? I am new to this list and don't know a lot about perl, but I think you could use pipes in perl. Pritpal Dhaliwal -Original Message- From: David T-G [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 2:52 AM To: perl beginners Cc:

Crypt::Cracklib?

2002-07-23 Thread Batchelor, Scott
Does anyone have any experience with this module? Basically I have a PHP page which is passing a username and password to a perl script that does some preliminary checking...then I want to call cracklib to do the rest... Does anyone have a good example of how to do this. Everything is working

Re: Need help with package

2002-07-23 Thread drieux
On Tuesday, July 23, 2002, at 09:45 , chris wrote: You are correct. perchance, but I will accept that as oh, well that's worth ripping off and reusing as being more accurate... I will follow your advice. may I recommend that you limit following my advice to only the 'useful

Re: Net::SMTP

2002-07-23 Thread Manya
Have you installed Net::SMTP, it comes as a part of libnet package. If you have installed it check that the install directory is a part of the @INC array. How to check if a module is installed or not ? Manya --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system

system() error return codes

2002-07-23 Thread Bob Green
I need to execute DOS level commands from perl and I must be able to test for success. I've found the system() function and it seems to work except I'm having problems getting the correct error return back. To test the error return I've created this very simple code. In it I try everything I

pushd and popd

2002-07-23 Thread Shishir K. Singh
I was just wondering if there is anything similar in perl for unix commands pushd / popd ?? Thanks Shishir -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: system() error return codes

2002-07-23 Thread Bob Showalter
-Original Message- From: Bob Green [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 9:11 AM To: [EMAIL PROTECTED] Subject: system() error return codes I need to execute DOS level commands from perl and I must be able to test for success. I've found the system()

RE: pushd and popd

2002-07-23 Thread Kipp, James
how about functions like push, pop, shift, unshift ? -Original Message- From: Shishir K. Singh [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 2:15 PM To: [EMAIL PROTECTED] Subject: pushd and popd I was just wondering if there is anything similar in perl for unix

Re: pushd and popd

2002-07-23 Thread Jeff 'japhy' Pinyan
On Jul 23, Shishir K. Singh said: I was just wondering if there is anything similar in perl for unix commands pushd / popd ?? I can't find such a thing. You (or someone else) could write one. It doesn't seem too difficult; it's just an array. -- Jeff japhy Pinyan [EMAIL PROTECTED]

RE: pushd and popd

2002-07-23 Thread Shishir K. Singh
hmmm..they are array functions...I guess I can use the cwd/push/pop to simulate the pushd and popd, just was being lazy :) and wanted to know if a direct pushd popd kind of function exists!! how about functions like push, pop, shift, unshift ? -Original Message- From: Shishir K.

RE: pushd and popd

2002-07-23 Thread Shishir K. Singh
I was just wondering if there is anything similar in perl for unix commands pushd / popd ?? I can't find such a thing. You (or someone else) could write one. It doesn't seem too difficult; it's just an array. Good Idea!! might as well do that!! -- To unsubscribe, e-mail: [EMAIL PROTECTED]

Re: Cut string between the words

2002-07-23 Thread Shawn
Check out Text::Wrap on CPAN. http://search.cpan.org/doc/MUIR/Text-Tabs+Wrap-2001.0131/lib/Text/Wrap.pm Shawn - Original Message - From: David Gerler [EMAIL PROTECTED] To: Beginners [EMAIL PROTECTED] Sent: Tuesday, July 23, 2002 1:16 PM Subject: Cut string between the words I figure

Re: pushd and popd

2002-07-23 Thread John W. Krahn
Shishir K. Singh wrote: I was just wondering if there is anything similar in perl for unix commands pushd / popd ?? pushd and popd are built-in shell commands, they aren't really Unix commands. What exactly are you trying to do? perldoc -f push perldoc -f pop perldoc -f shift perldoc -f

RE: pushd and popd

2002-07-23 Thread Shishir K. Singh
I was just wondering if there is anything similar in perl for unix commands pushd / popd ?? pushd and popd are built-in shell commands, they aren't really Unix commands. What exactly are you trying to do? perldoc -f push perldoc -f pop perldoc -f shift perldoc -f unshift perldoc -f

Re: Cut string between the words

2002-07-23 Thread Jeff 'japhy' Pinyan
On Jul 23, David Gerler said: How do I measure a string to see if it is greater than 85 characters? Using length(). if (length($str) 85) { ... } Basically, if the string is more than 85 characters, how do I break it at the last full word? Well, it depends what you call a word. Let's

Re: One Liner Problems

2002-07-23 Thread Jeff 'japhy' Pinyan
On Jul 23, Balint, Jess said: Hello. What is wrong with this? perl -e 'for(1..300){sleep 1;print .;}' It never prints anything. Thanks. Yes it does. It prints

RE: One Liner Problems

2002-07-23 Thread Nikola Janceski
output is buffered. try it like this perl -e 'for(1..300){sleep 1;print .\n;}' -Original Message- From: Balint, Jess [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 2:37 PM To: '[EMAIL PROTECTED]' Subject: One Liner Problems Hello. What is wrong with this? perl -e

RE: One Liner Problems

2002-07-23 Thread Balint, Jess
Is there a command line switch for that? -Original Message- From: Nikola Janceski [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 2:50 PM To: 'Balint, Jess'; '[EMAIL PROTECTED]' Subject: RE: One Liner Problems output is buffered. try it like this perl -e 'for(1..300){sleep

Re: One Liner Problems

2002-07-23 Thread George Schlossnagle
STDOUT is line-buffered. either unbuffer it ($| = 1;) or use stderr perl -e 'for(1..300){sleep 1;print STDERR .;}' On Tuesday, July 23, 2002, at 02:37 PM, Balint, Jess wrote: Hello. What is wrong with this? perl -e 'for(1..300){sleep 1;print .;}' It never prints anything. Thanks. Jess

RE: One Liner Problems

2002-07-23 Thread Jeff 'japhy' Pinyan
On Jul 23, Balint, Jess said: Is there a command line switch for that? To automatically place a newline after every print(), use the -l switch. -- Jeff japhy Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmonks.org/

RE: One Liner Problems

2002-07-23 Thread nkuipers
= Original Message From Balint, Jess [EMAIL PROTECTED] = Hello. What is wrong with this? perl -e 'for(1..300){sleep 1;print .;}' It never prints anything. Thanks. I wrote a script like this: for (1..5) { sleep 1; print .; } when i ran it, i timed it. it took exactly 5

RE: Cut string between the words

2002-07-23 Thread David Gerler
Thanks Shawn, but I need to basically split the string into two strings between the words. I need to put the second half of the string into another string. That may help with some future scripts though. Thanks for pointing it out. David Gerler Gerler Enterprises PO BOX 16357

RE: How to parse a full pathname into dir, file, ext?

2002-07-23 Thread nkuipers
= Original Message From chris [EMAIL PROTECTED] = Given a full pathname c:\windows\system32\kernel32.dll I need to parse this into a directory, file, and extension my $fullfilename = c:\\windows\\system32\\kernel32.dll; breaks down into the following my $dir = c:\\windows\\system32\\;

Re: pushd and popd

2002-07-23 Thread John W. Krahn
Shishir K. Singh wrote: I was just wondering if there is anything similar in perl for unix commands pushd / popd ?? pushd and popd are built-in shell commands, they aren't really Unix commands. What exactly are you trying to do? perldoc -f push perldoc -f pop perldoc -f shift

RE: pushd and popd

2002-07-23 Thread Shishir K. Singh
Thanks John...I appreciate it!! I was just wondering if there is anything similar in perl for unix commands pushd / popd ?? pushd and popd are built-in shell commands, they aren't really Unix commands. What exactly are you trying to do? perldoc -f push perldoc -f pop perldoc -f

Re: pushd and popd

2002-07-23 Thread drieux
On Tuesday, July 23, 2002, at 11:39 , Shishir K. Singh wrote: [..] I have this awfully old shell script that used lots of pushd and popd and I need to convert it to perl. I will have to settle with push and pop and cwd for the time being. Thanks anyways !! traditionally pushd/popd are

RE: Cut string between the words

2002-07-23 Thread David Gerler
Thanks to all that posted... very informative.. and helpful. David Gerler Gerler Enterprises PO BOX 16357 Chesapeake VA 23328 http://www.GerlerEnterprises.com/ Nationwide Dial-up from $12.45 http://www.EasySitesForLess.com/ -Original Message- From: Jeff 'japhy' Pinyan [mailto:[EMAIL

Re: How to parse a full pathname into dir, file, ext?

2002-07-23 Thread chris
I get it. Thank you use File::Basename; my $os_string = MSWin32; fileparse_set_fstype($os_string); my $fullfilename = c:\\windows\\system32\\kernel32.dll; my ($name,$path,$suffix) = fileparse($fullfilename, '\..*'); $suffix =~ s/\.//g; print $name\n . $path\n . $suffix\n; -- To unsubscribe,

Re: pushd and popd

2002-07-23 Thread John W. Krahn
John W. Krahn wrote: Shishir K. Singh wrote: I was just wondering if there is anything similar in perl for unix commands pushd / popd ?? pushd and popd are built-in shell commands, they aren't really Unix commands. What exactly are you trying to do? perldoc -f push

RE: Crypt::Cracklib?

2002-07-23 Thread Batchelor, Scott
Anyone have any input on this? Scott -Original Message- From: Batchelor, Scott Sent: Tuesday, July 23, 2002 12:07 PM To: [EMAIL PROTECTED] Subject:Crypt::Cracklib? Does anyone have any experience with this module? Basically I have a PHP page which is passing a

RE: Crypt::Cracklib?

2002-07-23 Thread Nikola Janceski
I just checked CPAN and found: http://search.cpan.org/doc/DANIEL/Crypt-Cracklib-0.01/Cracklib.pm and there is a good example right there, but there isn't much documentation. That's all the input I can supply. -Original Message- From: Batchelor, Scott [mailto:[EMAIL PROTECTED]] Sent:

Re: Crypt::Cracklib?

2002-07-23 Thread George Schlossnagle
Probably not the input you're looking for but: If your page is in php, why are you passing it to a perl script? Having to maintain things in two languages is a pain, you invariably end up with large amounts of duplicated code. Maintaining redundant code in 1 language is hard enough,

Re: How to make @array2 use values of @array1?

2002-07-23 Thread Michael Fowler
On Mon, Jul 22, 2002 at 11:13:23PM -0700, nkuipers wrote: What I am about to raise, I do so more out of wanting someone to educate me than disagreeing for the sake of. The *that syntax shown below is unfamiliar to me outside the context of referencing a filehandle in a subroutine params

Please help with Database issue

2002-07-23 Thread Garry
Hello everyone, I sure hope I am posting in the right place, the beginners definitely applies here. I have a web hosting account and my ISP has the following Perl modules installed: AnyDBM_File,pm db_file NDBM_File.pm ODBM_File.pm SDBM_File.pm gdbm_file perl5db.pl They have a statement on

Re: Crypt::Cracklib?

2002-07-23 Thread George Schlossnagle
To make a comment more to your intent, I just installed Crypt::Cracklib. It seems to work fine. It's not particularly slow, so unless there is a reason you want to supplement it, I would just run with the cracklib checks. On Tuesday, July 23, 2002, at 04:10 PM, George Schlossnagle wrote:

Re: Please help with Database issue

2002-07-23 Thread George Schlossnagle
On Tuesday, July 23, 2002, at 04:06 PM, Garry wrote: Hello everyone, I sure hope I am posting in the right place, the beginners definitely applies here. I have a web hosting account and my ISP has the following Perl modules installed: AnyDBM_File,pm db_file NDBM_File.pm ODBM_File.pm

Re: Please help with Database issue

2002-07-23 Thread Jenda Krynicky
From: Garry [EMAIL PROTECTED] I sure hope I am posting in the right place, the beginners definitely applies here. I have a web hosting account and my ISP has the following Perl modules installed: AnyDBM_File,pm db_file NDBM_File.pm ODBM_File.pm SDBM_File.pm gdbm_file perl5db.pl

Re: Please help with Database issue

2002-07-23 Thread George Schlossnagle
I'm putting this back on-list since other people may be interested in continuing this thread. If you already have all this information in an access db and you like access, I would recommend finding a hosting provider that will host your access app. Alternatively, a provider that would

Re: Please help with Database issue

2002-07-23 Thread George Schlossnagle
Even better option might be DBD::SQLite. That's a whole SQL compatible database in Perl module. It is quicker than DBD::CSV/DBD::File and the whole database is just one file, just like Access. Wow, learn something new everyday. Very cool. That way you do not have to upload tens of files.

How to expand Unix command in echo statement?

2002-07-23 Thread kent ho
Please help. I want to expand the date command in the echo command: Ex: $log=/tmp/ito.log `echo Warning: some text $log` I need to expand the date command somewhere in this echo command, please show me how. Thanks, kent -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

RE: How to expand Unix command in echo statement?

2002-07-23 Thread nkuipers
$log=/tmp/ito.log `echo Warning: some text $log` I need to expand the date command somewhere in this echo command, please show me how. the perl localtime function returns the same information as a unix date command. printing to an append filehandle in perl is similar to echoing to a file.

Re: How to expand Unix command in echo statement?

2002-07-23 Thread George Schlossnagle
Ick. If you want to shell program you should just program shell. How about: my $log=/tmp/ito.log; open LOG, $log; chomp (my $date = scalar localtime); print LOG [$date] Warning: some text\n; On Tuesday, July 23, 2002, at 06:43 PM, kent ho wrote: Please help. I want to expand the date

  1   2   >