system() and STDOUT & STDERR

2001-10-24 Thread Gupta, Ashish
please help me solve another prob i am facing. i have 2 scripts --> a.pl and b.pl both scripts have a paramter called -logfile. if this is specified, the STDOUT and STDERR are redirected to this. now, I call b.pl from within a.pl using system(). the documentation for system() says that the ST

Regex query

2001-10-24 Thread Girish \(Skyscape\)
Hi All, Can this be done ? sample string E=mc;s2 should get converted to E=mc2 similarly H;b2O should get converted to H2O for this I use following code %Replacements = ( ";s(\d)", "$1" ,";b(\d)", "$1" ); $inputstr = "E=mc;s2"; foreach $x (keys %Replacements) {

Newbie: Need string substitution

2001-10-24 Thread "José A. Ferrer"
Hi all, I have a bunch of old xBase *.prg text files. I need to replace the sentence ON ERROR or on error with *ON ERROR in all *.prg text files in a given directory. How can it be done in Perl ? TIA. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PR

Re: Text file line input referencing

2001-10-24 Thread Robert Hall
I found this in O'rielly's Perl Cookbook. Could Someone let me know if it illegal to copy like this. Hope this helps: # looking for line number $DESIRED_LINE_NUMBER $. = 0; do { $LINE = } until $. == $DESIRED_LINE_NUMBER || eof; If you are going to be doing this a lot and the file fits into m

apache can't run cgi scripts

2001-10-24 Thread Jorge Rocha
Hi all!!! i'm new using perl, i downloaded a system. it uses PostgreSQL, DBI and PG DBD. i have installed all ok, but when i try to run the index.cgi, it sends an error message. error 403 forbidden, You don't have permission to access /index.cgi on this server. i compiled apache to run php, cgi,

Inserting Row into Access 2000 Table Using DBI:ODBC

2001-10-24 Thread Alan Hogue
Hello, I'm trying to write a program that will update a simple Access 2000 table. Whenever I try to run the insert statement, though, I get the following error back: " DBD::ODBC::st execute failed: [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query. (SQL-S1000)(DBD:

RE: Pushing and Popping ENV

2001-10-24 Thread Bob Showalter
> -Original Message- > From: Daryl J. Hoyt [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, October 24, 2001 4:22 PM > To: Beginners Perl > Subject: Pushing and Popping ENV > > > Hi, > I would like to run a script that would significantly change the > environment several times. I was w

RE: strange fork (if - else)behavior

2001-10-24 Thread Bob Showalter
> -Original Message- > From: zentara [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, October 24, 2001 1:03 PM > To: [EMAIL PROTECTED] > Subject: strange fork (if - else)behavior > > ... > OK, I'm just learning, so I wanted to try this fork statement. > > #!/usr/bin/perl

Get MAC address from Win32 Machine

2001-10-24 Thread Mike Rapuano
Hi all -- I need to gather the MAC address from some win32 machines. Which module would you recommend? Is Win32::NetAdmin the right one? thanks Mike -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Commenting.

2001-10-24 Thread Brett W. McCoy
On Wed, 24 Oct 2001, SAWMaster wrote: > Is there a way to "block comment" in Perl? > > My book only covers using # to comment individual lines. > > Is there a symbol I can use to comment out entire sections of code for > the debugging process? You basically use embedded POD directives. perldoc

RE: Pushing and Popping ENV

2001-10-24 Thread Joshua Colson
You cannot push and pop a (%) hash. But If you want to retain the original values, just copy them to a temporary hash. i.e. %temphash = %ENV; delete %ENV{'HOME');# Operate on %ENV %ENV = %temphash; # Restore %ENV -Original Message- From: Daryl J. Hoyt [mailto:[EMAI

Pushing and Popping ENV

2001-10-24 Thread Daryl J. Hoyt
Hi, I would like to run a script that would significantly change the environment several times. I was wondering if there is a way to push and pop the environment table in Perl so I could always start with the original environment table. Any ideas. Thanks, Daryl J. Hoyt Performance Enginee

strange fork (if - else)behavior

2001-10-24 Thread zentara
>Micheal Fowler wrote: >Use fork and exec: > > my $pid = fork(); > die("Unable to fork: \l$!.\n") unless defined($pid); >if ($pid) { ># Get the window title. >} else { >exec($program); >} >It's not guaranteed the child will be ready when then parent is reaches the >c

RE: Commenting.

2001-10-24 Thread Kipp, James
If your working in vi , you could do: :1,10s/./# &/ which will comment lines 1 to 10 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Commenting.

2001-10-24 Thread Curtis Poe
--- SAWMaster <[EMAIL PROTECTED]> wrote: > Is there a way to "block comment" in Perl? > > My book only covers using # to comment individual lines. > > Is there a symbol I can use to comment out entire sections of code for the debugging >process? I like to use a debugging constant. use con

Re: Commenting.

2001-10-24 Thread Casey West
On Oct 24, 2001 at 03:54 -0400, Heely, Paul took the soap box and proclaimed: : I have used: : : if(0) { : BLOCK OF CODE : } : : or : : =item comment : : BLOCK OF CODE : : =cut You could also take advantage of here docs: print "foo\n"; <<__COMMENT__; This is my block comment!

RE: Commenting.

2001-10-24 Thread Wagner-David
I use =head1 and =cut to either make comments or to remove a section of code but keep. Wags ;) -Original Message- From: SAWMaster [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 24, 2001 12:44 To: [EMAIL PROTECTED] Subject: Commenting. Is there a way to "block comment" in

RE: Commenting.

2001-10-24 Thread Heely, Paul
I have used: if(0) { BLOCK OF CODE } or =item comment BLOCK OF CODE =cut --Paul > -Original Message- > From: SAWMaster [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, October 24, 2001 3:44 PM > To: [EMAIL PROTECTED] > Subject: Commenting. > > > Is there a way to "block comment" in P

Commenting.

2001-10-24 Thread SAWMaster
Is there a way to "block comment" in Perl? My book only covers using # to comment individual lines. Is there a symbol I can use to comment out entire sections of code for the debugging process?

Re: perl/php args

2001-10-24 Thread Etienne Marcotte
Seriously it's really easy to script with DBI But anyways that's not the purpose of the thread. What is exactly returned by php? a string? what does it looks like? Etienne Tyler Cruickshank wrote: > Thanks all. Well, this is a personal project that Im working on w/ a buddy. He's a >php guy

Re: perl/php args

2001-10-24 Thread Tyler Cruickshank
Thanks all. Well, this is a personal project that Im working on w/ a buddy. He's a php guy while I do perl (to some extent anyhow!). He just wanted to do it in phpand I havent used the DBI module before. ty >>> "Etienne Marcotte" <[EMAIL PROTECTED]> 10/24/01 12:36PM >>> Maybe, but if al

Re: Using Perl to contol an FTP session

2001-10-24 Thread Ta Chien
I have something done for you already , follow this link : http://www.geocities.com/chien_ta/send_files.pl Gary Stainburn wrote: > Have a look at Net::FTP. it's a perl module to do just what you want > > On Wednesday 24 October 2001 4:39 pm, Eddie T Kayes wrote: > > I want to control an ftp ses

Re: System call from CGI script

2001-10-24 Thread James B. Williams II
Hi all, Sorry if this reposts, but this didn't seem to go through the first time.. I just posted a question to the beginners-cgi list yesterday; I'm having almost the exact same problem. Both my cgi script and the script I am trying to call via system are owned by root, but I'm not sure if tha

Re: perl/php args

2001-10-24 Thread Etienne Marcotte
Maybe, but if all the rest of the script is done in perl, I'm not sure if you keep the optimisation of using php to query the DB.. DBI and Perl all in the same script might be something to consider.. Except if there are already 4397825 hours of coding done in the php scripting :-) Etienne Jeff

Re: perl/php args

2001-10-24 Thread Jeff 'japhy' Pinyan
On Oct 24, Etienne Marcotte said: >Why aren't you pulling the data from the DB with Perl? Probably because PHP is optimized for that sort of interaction. -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmonks.org/ http:/

Re: perl/php args

2001-10-24 Thread Etienne Marcotte
Why aren't you pulling the data from the DB with Perl? Etienne Tyler Cruickshank wrote: > Sorry if you get this 2x it may not have gone thru the first time. > > Hello. > > Im working on a perl/php/SVG project. PHP interfaces with a DB (to pull out a data >array) and perl does the rest of the

perl/php args

2001-10-24 Thread Tyler Cruickshank
Sorry if you get this 2x it may not have gone thru the first time. Hello. Im working on a perl/php/SVG project. PHP interfaces with a DB (to pull out a data array) and perl does the rest of the work. Does anyone know if perl can accept a php array as an arg? Thanks -Tyler -- To unsub

Re: mod_perl

2001-10-24 Thread Etienne Marcotte
I found an interesting website (if any other user is interested) http://take23.org/whatis_mod_perl.xml I will finish my project using normal perl with the DB and if speed is too slow I'll try mod_perl Etienne Bob Showalter wrote: > > -Original Message- > > From: Etienne Marcotte [mail

Re: Perl, Win2K, and Apache

2001-10-24 Thread Richard S. Crawford
That didn't seem to do it. I suspect that there may be something deeper in my httpd.conf file that I'm missing. I'll keep poking around. At 10:30 AM 10/24/2001, Etienne Marcotte wrote: >Hum.. > >On my computer, exact same configuration (Apache, mySQL, Perl) I open IE >and go to >http://localh

RE: mod_perl

2001-10-24 Thread Bob Showalter
> -Original Message- > From: Etienne Marcotte [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, October 24, 2001 1:39 PM > To: Brett W. McCoy > Cc: [EMAIL PROTECTED] > Subject: Re: mod_perl > > > Ok, thanks for the infos. > > Do I need to type use mod_perl; in scripts? No. A script cannot

Re: mod_perl

2001-10-24 Thread Brett W. McCoy
On Wed, 24 Oct 2001, Etienne Marcotte wrote: > Do I need to type use mod_perl; in scripts? No, it's handled through the Apache server configuration, although there are Apache::* modules that can be used for extra functionality. > And is scipting in strict enough as of "good" scripting is involv

Re: mod_perl

2001-10-24 Thread Etienne Marcotte
Ok, thanks for the infos. Do I need to type use mod_perl; in scripts? And is scipting in strict enough as of "good" scripting is involved? Etienne "Brett W. McCoy" wrote: > On Wed, 24 Oct 2001, Etienne Marcotte wrote: > > > I read often about that mod_perl that makes perl run a lot faster and

Re: mod_perl

2001-10-24 Thread Brett W. McCoy
On Wed, 24 Oct 2001, Brett W. McCoy wrote: > See http://perl/apache.org for more information, if you are interested. Oops, that should be http://perl.apache.org -- Brett http://www.chapelperilous.net/

RE: mod_perl

2001-10-24 Thread Bob Showalter
> -Original Message- > From: Etienne Marcotte [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, October 24, 2001 12:13 PM > To: [EMAIL PROTECTED] > Subject: mod_perl > > > I read often about that mod_perl that makes perl run a lot faster and > etc. mod_perl is an Apache module that integrat

Re: mod_perl

2001-10-24 Thread Brett W. McCoy
On Wed, 24 Oct 2001, Etienne Marcotte wrote: > I read often about that mod_perl that makes perl run a lot faster and > etc. I tought until now that it was "by default" mod_perl when it's > with the apache distribution, but Brett stated: "and CGI::Carp has > some problems when run under mod_perl"

Re: Perl, Win2K, and Apache

2001-10-24 Thread Etienne Marcotte
Hum.. On my computer, exact same configuration (Apache, mySQL, Perl) I open IE and go to http://localhost/cgi-bin/perltest.pl and it works. 404 error is file not found, so this is strange.. it's probably in your httpd.conf file you should have a line stating: ScriptAlias /cgi-bin/ "C:/Program

Re: Perl, Win2K, and Apache

2001-10-24 Thread Richard S. Crawford
Done... but is there then a way to get to the script directly, so that I can browse to http://localhost/cgi-bin/perltest.pl ? I get a 404 error when I try.. At 09:54 AM 10/24/2001, Etienne Marcotte wrote: >You need to put the pl file in /cgi-bin/ > >Etienne > >"Richard S. Crawford" wrote: > >

Re: Perl, Win2K, and Apache

2001-10-24 Thread Etienne Marcotte
You need to put the pl file in /cgi-bin/ Etienne "Richard S. Crawford" wrote: > I do indeed: > > #! c:/Perl/bin/Perl.exe -w > > Unfortunately, the output I get when I browse to > http://localhost/perltest.pl or http://localhost/perltest.cgi is simply the > text of the script itself, formatted l

Re: Perl, Win2K, and Apache

2001-10-24 Thread Richard S. Crawford
I do indeed: #! c:/Perl/bin/Perl.exe -w Unfortunately, the output I get when I browse to http://localhost/perltest.pl or http://localhost/perltest.cgi is simply the text of the script itself, formatted like a text page. At 09:20 AM 10/24/2001, Etienne Marcotte wrote: >Humm > >do you have th

workaround for unix2dos system command

2001-10-24 Thread Rice, Elizabeth A.
I am modifying a perl script that was originally written for a Solaris platform, where the unix2dos system command is available. The script puts text and filenames into a log file, then runs unix2dos command against the log file, then ships it off as part of a sendmail command. on OS/390 there

Re: How do I get username in Perl ?

2001-10-24 Thread _brian_d_foy
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > use > $user_name = $ENV{'AUTH_USER'}; # for name of the user > and > $user_psw = $ENV{'AUTH_PASSWORD'}; # for password i suppose that might work somewhere, but not in anything i've ever seen. if you are talking about CGI, you're usin

Re: Sending HTTP Headers

2001-10-24 Thread brian d foy
In article <006901c15c80$e66a4ce0$070a@skullbox>, [EMAIL PROTECTED] (Brent Jones) wrote: > I was just wondering how one would go about sending an HTTP request header > to a webserver. use LWP::UserAgent; use HTTP::Request; http://search.cpan.org/search?dist=libwww-perl http://sear

Re: Perl, Win2K, and Apache

2001-10-24 Thread Etienne Marcotte
Humm do you have the full path in the shebang line? Etienne "Richard S. Crawford" wrote: > I've got Apache running on this Win2K box, as well as MySQL. I can make > PHP talk to MySQL, and I've managed to get Tomcat up and running and > talking to Apache as well, but I seem to be at a loss whe

Perl, Win2K, and Apache

2001-10-24 Thread Richard S. Crawford
I've got Apache running on this Win2K box, as well as MySQL. I can make PHP talk to MySQL, and I've managed to get Tomcat up and running and talking to Apache as well, but I seem to be at a loss when getting Perl to talk to Apache. Any help would be most appreciated. Sliante, Richard S. Cr

mod_perl

2001-10-24 Thread Etienne Marcotte
I read often about that mod_perl that makes perl run a lot faster and etc. I tought until now that it was "by default" mod_perl when it's with the apache distribution, but Brett stated: "and CGI::Carp has some problems when run under mod_perl" Does that mean a script has to be build for mod_perl

Re: Form and Hidden values

2001-10-24 Thread Hab Adkins
I have a live copy found at http://olorin.acu.edu/cgi-bin/form.pl h Etienne Marcotte wrote: > > You have a live version of this, to see if it's the hidden params that are > filled.. that's what I think. > > unless ($active) { > print hidden("name") if $name; > print hidden("address") if $

Re: Using Perl to contol an FTP session

2001-10-24 Thread dan radom
dan mentioned expect which does work fine, but i've been much more successful with the perl Expect.pm. it's more reliable for some reason, and much faster then plain old vanilla expect. dan * Eddie T Kayes ([EMAIL PROTECTED]) wrote: > I want to control an ftp session with a Perl script so tha

Re: Using Perl to contol an FTP session

2001-10-24 Thread dan.kelley
> I want to control an ftp session with a Perl script so that I can log on to > boxes (which may require a username & password or just a username), search > for files and move files from box to box. The script will have to deal with > the possible responses and be able to act accordingly. If you h

Using Perl to contol an FTP session

2001-10-24 Thread Eddie T Kayes
I want to control an ftp session with a Perl script so that I can log on to boxes (which may require a username & password or just a username), search for files and move files from box to box. The script will have to deal with the possible responses and be able to act accordingly. If you have any

Re: Form and Hidden values

2001-10-24 Thread Etienne Marcotte
You have a live version of this, to see if it's the hidden params that are filled.. that's what I think. unless ($active) { print hidden("name") if $name; print hidden("address") if $address; print hidden("city") if $city; print hidden("state") if $state; print hidden("zip") if $zip;

Re: No such file or directory exists

2001-10-24 Thread Peter Scott
At 10:12 AM 10/24/2001 -0500, [EMAIL PROTECTED] wrote: >elementary? oooh, that hurts =) Hey, everyone does it (or something like it), that's the only reason to call it elementary - because we manage to keep making the same mistakes and forgetting to check the obvious. You want to know how many

Re: Outputting errors

2001-10-24 Thread Brett W. McCoy
On Wed, 24 Oct 2001, Etienne Marcotte wrote: > When running a script from a browser, is it possible to actually see the > error messages? > > Each time there is one it states "Internal Server Error" and says the > error is in the log. Is there anyway to show it on the page, not in the > log.. if

Multi-page form and Hidden values

2001-10-24 Thread Hab Adkins
Oops. I forgot to attach the script. It is included here. I am having a problem with a form I'm trying to use. It has a page where data is entered, a confirmation page, and from there the ability to go back and change or submit. The problem is that if a user goes back to the first page and th

Re: Outputting errors

2001-10-24 Thread RaFaL Pocztarski
Etienne Marcotte wrote: > When running a script from a browser, is it possible to actually see the > error messages? use CGI::Carp qw(fatalsToBrowser); or use CGI::Carp qw(fatalsToBrowser warningsToBrowser); see perldoc CGI::Carp - RaFaL Pocztarski, [EMAIL PROTECTED] -- To unsubscribe

Re: Form and Hidden values

2001-10-24 Thread Hab Adkins
I am having a problem with a form I'm trying to use. It has a page where data is entered, a confirmation page, and from there the ability to go back and change or submit. The problem is that if a user goes back to the first page and then back to the confirmation page there are multiple values li

Re: Gotta be a better way: File Compares

2001-10-24 Thread Jeff 'japhy' Pinyan
On Oct 24, Kingsbury, Michael said: >compiling xyz >"a: warning" >"b: warning" >compiling more stuff. >"a: warning" > >I want to get one instance of each warning & output it to a file. I can do >that by backticking it through sort, and loading lines that start with a " & >don't match the previou

Outputting errors

2001-10-24 Thread Etienne Marcotte
When running a script from a browser, is it possible to actually see the error messages? Each time there is one it states "Internal Server Error" and says the error is in the log. Is there anyway to show it on the page, not in the log.. if not, where is located/named that log file usually (I run

Re: No such file or directory exists

2001-10-24 Thread Greg . Froese
elementary? oooh, that hurts =) but you are right, I should have been using -w Peter Scott <[EMAIL PROTECTED]> 10/24/2001 10:03 AM To: [EMAIL PROTECTED], [EMAIL PROTECTED] cc: Subject:Re: No such file or directory exists At 09:01 AM 10/24/2001 -0500, [

Gotta be a better way: File Compares

2001-10-24 Thread Kingsbury, Michael
I'm trying to avoid loading this data into arrays & foreaching each one, so I want to see if anyone has an idea for a better way to do this. Part 1. Given the output from compiling xyz, I end up with a log with warnings as such compiling xyz "a: warning" "b: warning" compiling mor

Re: How to analyze core file

2001-10-24 Thread Peter Scott
At 10:04 AM 10/24/2001 -0400, Rajeev Nalluri wrote: >I had a perl script, which is generating a core file. How can I analyze the >core file? I am running it on AIX OS. >The syntax of the perl script is OK, but while running sometimes it is >generating the core file. Please explain. The Perl 5 Por

Re: No such file or directory exists

2001-10-24 Thread Peter Scott
At 09:01 AM 10/24/2001 -0500, [EMAIL PROTECTED] wrote: >I'm working with my perl scripts in Linux and Windows. my scripts were >running fine when I ran them as "perl myscript.pl" > >but when I tried to execute the perl script using only its name >(./myscript.pl) then I would get the message "No s

RE: Maintaining Order of Keys in a Hash

2001-10-24 Thread RArul
Peter: Here are some interesting points that I had observed in my analysis where PerlScript was very much sluggish vis-a-vis JavaScript and VBScript. The purpose of me doing that was this. The recordset is being given to the ASP Page as I had shown before. However, when the data is presented it

Re: No such file or directory exists

2001-10-24 Thread Etienne Marcotte
I run my scripts on both linux and windows and never got this problem.. Always edited with notepad or wordpad. I run them from the command line or by choosing "open with -> perl" directly on the file with my win2k. I really don't know what was causing the problem... but IMO the "no such file ex

Re: Text file line input referencing

2001-10-24 Thread Jeff 'japhy' Pinyan
On Oct 23, Shannon Murdoch said: >I've been using the while(){ command, but it's not very helpful >when I need something on line #15 or something. > >Is there any function like $linecontents = line(FILEHANDLE,15); ? Make your own. The concept uses a positional hash. The hash looks like this

How to analyze core file

2001-10-24 Thread Rajeev Nalluri
Hi, I had a perl script, which is generating a core file. How can I analyze the core file? I am running it on AIX OS. The syntax of the perl script is OK, but while running sometimes it is generating the core file. Please explain. Thanks, Rajeev Nalluri -- To unsubscribe, e-mail: [EMAIL PRO

Re: Why doesn't RETURN work?

2001-10-24 Thread Brett W. McCoy
On Wed, 24 Oct 2001, Gross, Stephan wrote: > I have a subroutine > > sub xyz > { > > if ($a = $b) > { >return; > } > } > > > When I run this in the debugger, it stays frozen on the RETURN statement. > Shouldn't the RETURN break out of the xyz subroutine? > Also, this used

Re: Text file line input referencing

2001-10-24 Thread Brett W. McCoy
On Tue, 23 Oct 2001, Shannon Murdoch wrote: > I am wondering if there is any way that I can take the contents of a > specific text file line number (I suppose it could be called a paragraph, > since a line is considered ended by a CR/LF and may contain multiple > sentences) and put them in to a v

RE: Why doesn't RETURN work?

2001-10-24 Thread Gross, Stephan
Sorry, that was a typo - I meant ($a == $b) ___ Stephan Gross Loral Skynet 908-470-2388 [EMAIL PROTECTED] -Original Message- From: Barry Carroll [mailto:[EMAIL PROTECTED]] Sent: Wednesday, O

RE: Why doesn't RETURN work?

2001-10-24 Thread RArul
How about if($a == $b) ? -Original Message- From: Gross, Stephan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 24, 2001 9:47 AM To: 'Beginner Perl' Subject: Why doesn't RETURN work? I have a subroutine sub xyz { if ($a = $b) { return; } } When I run th

Re: Regex frustration...

2001-10-24 Thread Brett W. McCoy
On Wed, 24 Oct 2001, Daniel Falkenberg wrote: > test1:x:26:testing1 > test2:x:45:testing2 > test3:x:45:testing3 > test4:x:23:testing4 > test5:x:45:testing5 > > Now I need to strip everything in there that is before the first ':' and > only match anything with the ':45'. I also need to be able to

RE: Why doesn't RETURN work?

2001-10-24 Thread Barry Carroll
Hi, 'if ($a = $b)' is not comparing $a to $b, it is assigning the value of $b into $a If you want to test for numeric equivalence, use two '='s like 'if ($a == $b)' Then your code should be fine, Baz. -Original Message- From: Gross, Stephan [mailto:[EMAIL PROTECTED]] Sent: Wednesda

Why doesn't RETURN work?

2001-10-24 Thread Gross, Stephan
I have a subroutine sub xyz { if ($a = $b) { return; } } When I run this in the debugger, it stays frozen on the RETURN statement. Shouldn't the RETURN break out of the xyz subroutine? Also, this used to work until I made some changes. Am I missing something obvious?

Re: Text file line input referencing

2001-10-24 Thread Shannon Murdoch
I ended up doing this: open(DATAFILE,"file.txt") or die "\nCouldn\'t open $datafile\n"; @datafile = ('0'); $position = 1; while(){ chomp($_); $datafile[$position] = $_; $position++; } and then calling the lines as I needed them using $datafile[4] where 4 IS the line number (not line 5).

Re: Text file line input referencing

2001-10-24 Thread walter valenti
I think thath be very simply use a counter. Walter > Hi all, > > I am wondering if there is any way that I can take the contents of a > specific text file line number (I suppose it could be called a paragraph, > since a line is considered ended by a CR/LF and may contain multiple > sentences

Sending an HTTP header

2001-10-24 Thread Brent Jones
I was just wondering how one would go about sending an HTTP request header to a webserver. Right now, I have a perl script gather various system information (uptime, users, load average, etc.) and jumble it into a big, ready to post block. All I need to make that block to be able to post to a webs

Re: Regex frustration...

2001-10-24 Thread Martin Pfeffer
try to split the lines like: my ($var1, $var2,$var3,$var4) = split /:/, $line; # for every line of file than you can work with this as you like or you can split into array or in hash like this $hash{w1}{w2}{w3}{w4} = anything to control and than work with this hash Hope it helps Martin Daniel

Time Calculation

2001-10-24 Thread Martin Pfeffer
hi to all I hav a problem with GWT i use the following code: use DateTime::Precise; my $midnight = DateTime::Precise -> new(); my $day = $now -> day; my $month= $now -> month; my $year= $now -> year; $midnight -> set_from_datetime(qq($year.$month.$day 00:00:01)); $search_start = sp

Time - calculation

2001-10-24 Thread Martin Pfeffer
hi to all I hav a problem with GWT i use the following code: use DateTime::Precise; my $midnight = DateTime::Precise -> new(); my $day = $now -> day; my $month = $now -> month; my $year= $now -> year; $midnight -> set_from_datetime(qq($year.$month.$day 00:00:0

Re: Excel

2001-10-24 Thread La cuisson du pot au feu
Le Mardi 23 Octobre 2001 16:24, F.H a écrit : You need to use Range["B9"]->CurrentRegion->Rows->Count; Range["B9"]->CurrentRegion->Column->Count; hi, Alone; > Hi All, > > Anyone knows how to get a row/column count instead of specifying them as in > foreach my $row (2..130) > foreach my $colum

Text file line input referencing

2001-10-24 Thread Shannon Murdoch
Hi all, I am wondering if there is any way that I can take the contents of a specific text file line number (I suppose it could be called a paragraph, since a line is considered ended by a CR/LF and may contain multiple sentences) and put them in to a variable for manipulation. I've been using t

Re: Sending HTTP Headers

2001-10-24 Thread walter valenti
Why you use Socket? You can LWP. > I was just wondering how one would go about sending an HTTP request header > to a webserver. > Right now, I have a perl script gather various system information (uptime, > users, load average, etc.) and jumble it into a big, ready to post block. > All I need to

RE: How do I get username in Perl ?

2001-10-24 Thread Abhra Debroy
Hi Amit try this: use Win32; $name=Win32::LoginName(); print $name; HTH abhra > -Original Message- > From: Nisim, Amit [SMTP:[EMAIL PROTECTED]] > Sent: Wednesday, October 24, 2001 4:51 PM > To: [EMAIL PROTECTED] > Subject: How do I get username in Perl ? > > > Hi All, > > I

Sending HTTP Headers

2001-10-24 Thread Brent Jones
I was just wondering how one would go about sending an HTTP request header to a webserver. Right now, I have a perl script gather various system information (uptime, users, load average, etc.) and jumble it into a big, ready to post block. All I need to make that block to be able to post to a webs

Re: How do I get username in Perl ?

2001-10-24 Thread Natalia Vasilchenko
Hello! use $user_name = $ENV{'AUTH_USER'}; # for name of the user and $user_psw = $ENV{'AUTH_PASSWORD'}; # for password nvasil - Original Message - From: "Nisim, Amit" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, October 24, 2001 3:21 PM Subject: How do I g

Re: How do I get username in Perl ?

2001-10-24 Thread Jos I. Boumans
take a look at any of these (depending on your OS): the user id's are in $> and $< #perldoc perlvar for more information otherwise, try this: ### this will print out all your %ENV vars... look for 'user' or 'username' or some such perl -e "for (sort keys %ENV){print qq($_ => $ENV{$_}\n)}" hth,

How do I get username in Perl ?

2001-10-24 Thread Nisim, Amit
Hi All, I want to get the name of the user that run the script. How can I do it ? Amit -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Date Calculation

2001-10-24 Thread Martin
hi to all I hav a problem with GWT i use the following code: use DateTime::Precise; my $midnight = DateTime::Precise -> new(); my $day = $now -> day; my $month= $now -> month; my $year= $now -> year; $midnight -> set_from_datetime(qq($year.$month.$day 00:00:01)); $search_start = sp

Regex frustration...

2001-10-24 Thread Daniel Falkenberg
Hi all, I am working on a regex that just won't do what it's told... Basically I have a file like the following... test1:x:26:testing1 test2:x:45:testing2 test3:x:45:testing3 test4:x:23:testing4 test5:x:45:testing5 Now I need to strip everything in there that is before the first ':' and o