Re: How to count the number of whitespaces at the start of a line

2001-08-20 Thread Me
> count only the number of spaces at the START of the line OWTDI: $_ = ' test '; /^( *)/; # the parens capture the match into $1 print length $1; --- In case you are interested, you tried: > my $i = () = $str =~ /^\s/; This would print 0 or 1, depend

Re: perl GUI

2001-08-20 Thread Leo Pohl
Bruce Ferrell wrote: > There is, but I've never been able to get it to build. It's called > perlcomposer and you can find it on sourceforge: > > http://perlcomposer.sourceforge.net/index.html > > Good luck and if you can get it working, please let me know. I run a > Slackware system (7.1+) an

Re: I am a real begginer to perl......

2001-08-20 Thread Jos I. Boumans
LS, I should have this under 'paste' by now, seeing this apparently needs repeating every so often. DO NOT READ ENTIRE FILES INTO ARRAYS UNLESS THERE IS NO OTHER OPTION. are you realising you are slurping an entire file into memory? ever tried that with an apache log file? In this case, slur

help, real perl beguinner!!!

2001-08-20 Thread webmaster
please help HELP -- Forwarded message -- Date: Mon, 20 Aug 2001 05:04:31 -0400 (EDT) From: webmaster <[EMAIL PROTECTED]> To: Paul Johnson <[EMAIL PROTECTED]> Cc: Gary Stainburn <[EMAIL PROTECTED]>, jim-ryan <[EMAIL PROTECTED]>, [EMAIL PROTECTED] I have a little problem, it ha

RE: help, real perl beguinner!!!

2001-08-20 Thread Sally
$secretword = words{$name}; should read: $secretword = $words{$name}; Regards, Sally -Original Message- From: webmaster [mailto:[EMAIL PROTECTED]] Sent: 20 August 2001 10:13 To: [EMAIL PROTECTED] Subject: help, real perl beguinner!!! please help HELP -- Forwarded message

Re: your mail

2001-08-20 Thread Paul Johnson
On Mon, Aug 20, 2001 at 05:04:31AM -0400, webmaster wrote: > $secretword = words{$name}; $secretword = $words{$name}; -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

regex help with wildcards

2001-08-20 Thread Merritt Krakowitzer
Im not sure if this is possible but i want to delete all chars inbeteen < and > so if i had id like to delete it, Here an example of the best way i can figure out how to do it :) $string =~ s/\<.\>|\<..\>|\<...\>|\<\>|\<..\>// so I'm looking for a shorter way, I cant find any wildcards

thanks and keep helping!!!

2001-08-20 Thread webmaster
well thanks for the help... but ... well need osme some more ofo your expertise... sorry but I am a new new newest in this perl thing well following this randal swartz book, the example where the scritpt should opne an external file and check for a secretword... the external file is supposuse

Re: regex help with wildcards

2001-08-20 Thread Sascha Kersken
Hi! What about just doing $string =~ s/<[^>]+>//; which will match any number of chars that AREN'T ">" and a ">" behind that. Sascha At 12:06 20.08.01 +0200, you wrote: >Im not sure if this is possible but i want to delete all chars inbeteen >< and > so if i had id like to delete it, >Her

[drifting OT]Re: PERL IS NOT A HIGH LEVEL LANGUAGE

2001-08-20 Thread Gary Stainburn
And what's wrong with COBOL? It enabled a team of never more than 4 programmers to develop a totally in-house Dealer management system for a Ford Main Dealer Group, over a 10 year period, containing over 850k lines of code, developed specifically to run on a propiatory ICL mainframe, to be por

Re: regex help with wildcards

2001-08-20 Thread George S Pereira
Thi small program will explain how it can be done : #! /opt/bin/perl5 -w $str = 'This contains a number of ( and ) ... '; $str =~ s/<.*?>/<>/g; print "$str\n"; This program will remove all characters between < and >. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= George Pereira CMIE 11, Apple

Re: FTP and MD5

2001-08-20 Thread John Sands
Thanks for your comments, Michael. I don't know how this works (obviously). Let me back up and explain what I'm doing. I have a web site hosted on a machine at my company and the sysadmins did not want to let me use the Microsoft FTP server because it sent passwords in plaintext, so they installe

Re: FTP and MD5

2001-08-20 Thread Michael Fowler
On Mon, Aug 20, 2001 at 03:34:35AM -0700, John Sands wrote: > My question was, how do I change the Perl code to do the same thing? But > your comments tell me that I really don't understand what's happening or > how the authorization is supposed to work. Thanks. I would suggest finding the Serv-U

Re: How to count the number of whitespaces at the start of a line

2001-08-20 Thread Jeff 'japhy/Marillion' Pinyan
On Aug 20, Darren Edgerton said: >my $i = () = $str =~ /^\s/; >print $i; Your regex doesn't match globally, which is what you assumed, methinks. You could do: my $leading = () = $str =~ /\G\s/g; but that's more effort than I think you should need. You can just use: my $leading = length(

Re: How to count the number of whitespaces at the start of a line

2001-08-20 Thread Paul Johnson
On Mon, Aug 20, 2001 at 08:27:41AM -0400, Jeff 'japhy/Marillion' Pinyan wrote: > $str =~ /\s*/; > my $leading = length $1; that would be $str =~ /(\s*)/; OR my $leading = length $&; > ** Look for "Regular Expressions in Perl" published by Manning, in 2002 ** But I'm sure you kne

Clear

2001-08-20 Thread Robert_Collins
I am writing lines of information to the STDOUT(Screen). In Unix k-shell I can execute the "clear" command to remove all lines from the screen. How is this done in Perl? Thanks Robert ( Kent ) Collins: IBM Certified Solutions Expert Cell Phone: 214.632.3940 DBA Intranet Site: http://ora3db

Re: Clear

2001-08-20 Thread Tyler Longren
You use the "clear" command. system("clear"); I'm not sure what it is to clear the screen in dos. -- Tyler Longren Captain Jack Communications [EMAIL PROTECTED] www.captainjack.com On Mon, 20 Aug 2001 08:33:42 -0500 [EMAIL PROTECTED] wrote: > I am writing lines of information to the STDOUT(S

Building a perl module

2001-08-20 Thread Matt Haataja
Does any one know of some good information on building a perl module out of my existing C++ library. Any help is appreciated. Thanks Matt

RE: Clear

2001-08-20 Thread John Edwards
In DOS system("cls"); -Original Message- From: Tyler Longren [mailto:[EMAIL PROTECTED]] Sent: 20 August 2001 14:35 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: Clear You use the "clear" command. system("clear"); I'm not sure what it is to clear the screen in dos. -- Tyler

RE: Clear

2001-08-20 Thread Barry Carroll
I'd recommend that you do something like this: 1-assign the text clear into a variable, this will save time later on... eg: $clearScreen = "clear"; Then: system($clearScreen); will clear the screen when ever you want to do so - this is just the way i do it... probably better ways to do it as

RE: Building a perl module

2001-08-20 Thread Gibbs Tanton - tgibbs
Yes, check perldoc perlxstut and perldoc perlxs -Original Message- From: Matt Haataja To: [EMAIL PROTECTED] Sent: 8/20/2001 8:46 AM Subject: Building a perl module Does any one know of some good information on building a perl module out of my existing C++ library. Any help is appreciat

RE: thanks and keep helping!!!

2001-08-20 Thread Gibbs Tanton - tgibbs
One thing to realize is that open(WORDLIST, "wordlist") opens a file called wordlist, not WORDLIST. You might want to check in to getting the Learning Perl book...it is a better beginner's book than is the Perl Cookbook. Tanton -Original Message- From: webmaster To: perl Sent: 8/20/2001 4

Re: [drifting OT]Re: PERL IS NOT A HIGH LEVEL LANGUAGE

2001-08-20 Thread Mark Maunder
Personally I'm an RPG (as400) man myself. ;-) Isn't 'serious cobol' an oxymoron these days? Gary Stainburn wrote: > And what's wrong with COBOL? > > It enabled a team of never more than 4 programmers to develop a totally > in-house Dealer management system for a Ford Main Dealer Group, over a 10

Re: [drifting OT]Re: PERL IS NOT A HIGH LEVEL LANGUAGE

2001-08-20 Thread Paul Johnson
On Mon, Aug 20, 2001 at 09:24:12AM +0100, Gary Stainburn wrote: > And what's wrong with COBOL? [snip] > COBOL is great where it's meant to be, developing business systems ( provided > you're a fast typer). Of course, if you really have to write COBOL, you get Perl to generate it for you

RE: Clear

2001-08-20 Thread Bob Showalter
> -Original Message- > From: Barry Carroll [mailto:[EMAIL PROTECTED]] > Sent: Monday, August 20, 2001 9:40 AM > To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED] > Subject: RE: Clear > > > I'd recommend that you do something like this: > > 1-assign the text clear into a variable, this will sav

command line program control

2001-08-20 Thread C.Ouellette
I have a command line program running on Windows NT that I call up from a dos prompt. This program is written in C and has a simple menu structure. I would like to use Perl to control this program, by putting in the menu options and values in a particular order. For example: Main Menu: 1) Optio

RE: command line program control

2001-08-20 Thread John Edwards
What does this command line program do? Maybe there is a way to do the whole thing in Perl. -Original Message- From: C.Ouellette [mailto:[EMAIL PROTECTED]] Sent: 20 August 2001 15:02 To: [EMAIL PROTECTED] Subject: command line program control I have a command line program running on Win

RE: command line program control

2001-08-20 Thread Bob Showalter
> -Original Message- > From: C.Ouellette [mailto:[EMAIL PROTECTED]] > Sent: Monday, August 20, 2001 10:02 AM > To: [EMAIL PROTECTED] > Subject: command line program control > > > I have a command line program running on Windows NT > that I call up from a dos prompt. This program is > wri

Re: Another regular expression question?

2001-08-20 Thread Curtis Poe
--- Walnut <[EMAIL PROTECTED]> wrote: > Suck the file into a single variable and: > > $entirefile =~ s!\/\*.*?\*\/!!g; > > >I am also very new to Perl! I need to figure out how I could skip a > >block of comments in a C header file. For example, if I have something > >like the following: > > > >/

RE: command line program control

2001-08-20 Thread C.Ouellette
The C program uses our specific API's that we've developed in our software drivers. These API's are used to send commands to our hardware out the parallel port of the PC. I am tested the API commands, and making sure that they send the correct values with the C program. For a long term goal I wo

Re: How to count the number of whitespaces at the start of a line

2001-08-20 Thread Jeff 'japhy/Marillion' Pinyan
On Aug 20, Paul Johnson said: >On Mon, Aug 20, 2001 at 08:27:41AM -0400, Jeff 'japhy/Marillion' Pinyan wrote: > >> $str =~ /\s*/; >> my $leading = length $1; > >that would be > >$str =~ /(\s*)/; Err, yes. My mistake. >> ** Look for "Regular Expressions in Perl" published by Manning, in

Re: How to count the number of whitespaces at the start of a line

2001-08-20 Thread nfutter
OK. This is now my 3rd request. Please could someone delete me off this alias. Please delete all [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] emails I'm getting over 20 emails a day and this is very frustrating

RE: Another regular expression question?

2001-08-20 Thread Bob Showalter
> -Original Message- > From: Curtis Poe [mailto:[EMAIL PROTECTED]] > Sent: Monday, August 20, 2001 10:29 AM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Re: Another regular expression question? > > ... > 2. Oftimes, a programmer will comment out an entire chunk of > code. If t

Perl script editor for NT/2000

2001-08-20 Thread TOM TURPIN
Could someone suggest a good editor for writing scripts with? Tom Turpin CAD System Administrator Ryobi Technologies, Inc. 1428 Pearman Dairy Road Anderson, SC 29625 Office: (864) 964-3425 Pager: (864) 390-5195 Fax: (864) 964- Email: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROT

RE: Perl script editor for NT/2000

2001-08-20 Thread Sally
Text pad does me, Sally -Original Message- From: TOM TURPIN [mailto:[EMAIL PROTECTED]] Sent: 20 August 2001 16:21 To: '[EMAIL PROTECTED]' Subject: Perl script editor for NT/2000 Could someone suggest a good editor for writing scripts with? Tom Turpin CAD System Administrator Ryobi Tec

Re: Perl script editor for NT/2000

2001-08-20 Thread Tyler Longren
Context. It's free. http://www.fixedsys.com/context/ It's all I use on my Windows boxen. -- Tyler Longren Captain Jack Communications [EMAIL PROTECTED] www.captainjack.com On Mon, 20 Aug 2001 11:20:35 -0400 TOM TURPIN <[EMAIL PROTECTED]> wrote: > Could someone suggest a good editor for writi

RE: Perl script editor for NT/2000

2001-08-20 Thread John Edwards
UltraEdit www.ultraedit.com -Original Message- From: Sally [mailto:[EMAIL PROTECTED]] Sent: 20 August 2001 16:42 To: TOM TURPIN; [EMAIL PROTECTED] Subject: RE: Perl script editor for NT/2000 Text pad does me, Sally -Original Message- From: TOM TURPIN [mailto:[EMAIL PROTECTED]

Re: Perl script editor for NT/2000

2001-08-20 Thread Vincent Bouttier-Deslandes
XEmacs s is a pretty good editor too -even if it is much more bigger than the pad and not so easy to use if you don't know anything about Emacs ... :-( Visit : www.xemacs.org Sally a écrit : > Text pad does me, > > Sally > > -Original Message- > From: TOM TURPIN [mailto:[EMAIL PROTECTE

Re: Perl script editor for NT/2000

2001-08-20 Thread ???
EditPlus :D www.editplus.com - Original Message - From: "TOM TURPIN" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, August 21, 2001 12:20 AM Subject: Perl script editor for NT/2000 > Could someone suggest a good editor for writing scripts with? > > Tom Turpin > CAD System

RE: Perl script editor for NT/2000

2001-08-20 Thread Bill Odom
TOM TURPIN [mailto:[EMAIL PROTECTED]] asked: > > Could someone suggest a good editor for writing scripts with? > I use EditPlus (http://www.editplus.com/). It feels right, and is light enough to use as a full-time Notepad replacement. The syntax highlighting isn't bad, and you can customize it

Re: Perl script editor for NT/2000

2001-08-20 Thread Brett W. McCoy
On Mon, 20 Aug 2001, Vincent Bouttier-Deslandes wrote: > XEmacs s is a pretty good editor too -even if it is much more bigger > than the pad and not so easy to use if you don't know anything about > Emacs ... :-( > Visit : www.xemacs.org Hi, folks. I've been away on vacation for the past week,

assistance needed with data gathering/manipulation

2001-08-20 Thread Yacketta, Ronald
Folks, I have a series of ~ 350 data points, I have been asked to get a running average of each data point. IE: data points 1 - 20 1: 30 2: 23 3: 1 4: 23 5: 34 6: 56 7: 85 9: 32 10: 89 11: 23 12: 34 13: 19 14: 94 15: 11 16: 19 17: 54 18: 23 19: 87 20 49 avg1 = (value1 + values2..11) / 10 av

Re: How to count the number of whitespaces at the start of a line

2001-08-20 Thread Curtis Poe
--- Jeff 'japhy/Marillion' Pinyan <[EMAIL PROTECTED]> wrote: > On Aug 20, Paul Johnson said: > > >On Mon, Aug 20, 2001 at 08:27:41AM -0400, Jeff 'japhy/Marillion' Pinyan wrote: > > > >> $str =~ /\s*/; > >> my $leading = length $1; > > > >that would be > > > >$str =~ /(\s*)/; Haven't seen

formatting

2001-08-20 Thread F.H
Hi there, I hope this a is a simple one, I am trying to format a number so I get it rounded up to 4 decimals then padded with 2 zeros afterwards, $test = "142.09879543" ; $test = sprintf( "%.4f", $test); The output that I am looking for is 142.098800 This will be done via a loop through a whole

Re: How to count the number of whitespaces at the start of a line

2001-08-20 Thread Jeff 'japhy/Marillion' Pinyan
/me greets [Ovid] On Aug 20, Curtis Poe said: >First, I added the caret to force matching from the beginning of the line so we don't >accidentally >match embedded whitespace. That may or may not matter, depending upon the structure >of the data, >but since I haven't seen the rest of the threa

Re: How to count the number of whitespaces at the start of a line

2001-08-20 Thread Jeff 'japhy/Marillion' Pinyan
On Aug 20, Jeff 'japhy/Marillion' Pinyan said: > my $leading = $str =~ /(\s*)/ && length $1; Or, if you're using Perl 5.6: my $leading = $str =~ /\s*/ && $+[0]; -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmonks.or

Re: PERL IS NOT A HIGH LEVEL LANGUAGE

2001-08-20 Thread Bkwyrm
*- chucking in my extreme newbie's 2-cents'-worth -* Has anyone out there noticed that, when shopping at almost any of the huge book conglomerates, Perl is almost never shelved with the rest of the programming languages, but instead with Javascript and HTML in the "Web" section? -- Namaste, Kr

Re: PERL IS NOT A HIGH LEVEL LANGUAGE

2001-08-20 Thread Brett W. McCoy
On Mon, 20 Aug 2001, Bkwyrm wrote: > Has anyone out there noticed that, > when shopping at almost any of the huge > book conglomerates, > Perl is almost never shelved with the rest > of the programming languages, > but instead with Javascript and HTML in > the "Web" section? Harrumph indeed! Th

RE: formatting

2001-08-20 Thread Bob Showalter
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Monday, August 20, 2001 12:30 PM > To: [EMAIL PROTECTED] > Subject: formatting > > > Hi there, > I hope this a is a simple one, > I am trying to format a number so I get it rounded up to 4 > decimals then

RE: Perl script editor for NT/2000

2001-08-20 Thread Steve Swords
www.google.com is a good place to search for anything -Original Message- From: TOM TURPIN [mailto:[EMAIL PROTECTED]] Sent: Monday, August 20, 2001 8:21 AM To: '[EMAIL PROTECTED]' Subject: Perl script editor for NT/2000 Could someone suggest a good editor for writing scripts with? Tom T

RE: [drifting OT]Re: PERL IS NOT A HIGH LEVEL LANGUAGE

2001-08-20 Thread Dean Theophilou
The only good thing about the nasty little Kobols are that they have only 1-4 hit points (if I remember correctly). :)) Dean Theophilou Genisar. -Original Message- From: Gary Stainburn [mailto:[EMAIL PROTECTED]] Sent: Monday, August 20, 2001 1:24 AM To: jim-ryan; [EMAIL PROTECTED] Su

RE: [drifting OT]Re: PERL IS NOT A HIGH LEVEL LANGUAGE

2001-08-20 Thread Gene Martin
>>>Dean Theophilou Genisar wrote: >>>The only good thing about the nasty little Kobols are that they have >>>only 1-4 hit points (if I remember correctly). :)) That would be Kobolds, which have 1/2 hit die (1-4 hit points), have faces like dogs and bark like them... Gene (who played way too mu

Re: untainting passwords

2001-08-20 Thread Peter Scott
At 01:07 PM 8/19/01 -0400, Kurt Edmiston wrote: >Hi, can someone tell me the proper syntax for untainting a UNIX password? > >if ($password_T =~ /( )/) {$password = $1;} else {$password=' ';} > >What goes in the ( ) ? Show us the operation you want to perform on the password which fails when us

Re: assistance needed with data gathering/manipulation

2001-08-20 Thread jim-ryan
You have a list where you are adding an element to one end and then taking away an element from the other end. Hold the sum in a varialble $sum iterate 1 through 10 adding each element to $sum. $avg = $sum/10; Then iterate through until last element is reached $sum = $sum - $first_element + $new

k-shell to Perl

2001-08-20 Thread Robert_Collins
Is there a conversion product(shareware) that I can use to convert k-shell code to Perl? Robert ( Kent ) Collins: IBM Certified Solutions Expert Cell Phone: 214.632.3940 DBA Intranet Site: http://ora3dba.i2.com/support "Major advancements in technology are indistinguishable from Magic"

RE: [drifting OT]Re: PERL IS NOT A HIGH LEVEL LANGUAGE

2001-08-20 Thread Rogers, Gary (AP- Server Adminstrator)
Just remember that Cobol, the language is more akin to Tucker's Kobolds as detailed in an old edition of Dragon Magazine, than the plain vanilla version detailed in the Monster Manual. Grr (who is WAY too old to be able to remember Tucker's Kobolds...) -Original Message- From: Gene Marti

Re: How to count the number of whitespaces at the start of a line

2001-08-20 Thread Curtis Poe
--- Jeff 'japhy/Marillion' Pinyan <[EMAIL PROTECTED]> wrote: > /me greets [Ovid] > > On Aug 20, Curtis Poe said: > > >First, I added the caret to force matching from the beginning of the line so we >don't > accidentally > >match embedded whitespace. That may or may not matter, depending upon t

RE: Perl script editor for NT/2000

2001-08-20 Thread Dean Theophilou
For a list of editors, go here: http://www.perlmonks.org/index.pl?node=Outside%20Links or here: http://www.perl.com/cs/user/query/q/6?id_topic=41 I use CodeMagic, which is not on the above two lists: http://www.codemagiccd.com Dean Theophilou Genisar -Original Message- From: TOM

RE: [drifting OT]Re: PERL IS NOT A HIGH LEVEL LANGUAGE

2001-08-20 Thread Dean Theophilou
Yes, that's right, but they program in "Kobol". :)) Dean (I, too, played wyyy to much AD&D). -Original Message- From: Gene Martin [mailto:[EMAIL PROTECTED]] Sent: Monday, August 20, 2001 10:44 AM To: '[EMAIL PROTECTED]' Subject: RE: [drifting OT]Re: PERL IS NOT A HIGH LEVEL LANGUA

chomp & list

2001-08-20 Thread Jennifer Pan
I have a file : #myfile.txt a b c d a c s g g o y g _END_ I wrote a perl script to put each line into a list; #/usr/bin/perl -w open (FH, "myfile.txt") ; while ($LINE = ) { chomp $LINE; push @list, $LINE; } close FH; print $_

Re: chomp & list

2001-08-20 Thread Maxim Berlin
Hello Jennifer, Tuesday, August 21, 2001, Jennifer Pan <[EMAIL PROTECTED]> wrote: JP> I have a file : JP> #myfile.txt JP> a b c d JP> a c s g JP> g o y g JP> _END_ JP> I wrote a perl script to put each line into a list; JP> #/usr/bin/perl -

k-shell case statement

2001-08-20 Thread Robert_Collins
What is the best perl example of a k-shell case statement as follows: case "$VAR1" in 1 ) statements ;; 2) statements ;; * ) other statements esac

RE: k-shell case statement

2001-08-20 Thread Gibbs Tanton - tgibbs
perldoc -q switch -Original Message- From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 8/20/2001 4:25 PM Subject: k-shell case statement What is the best perl example of a k-shell case statement as follows: case "$VAR1" in 1 ) statements ;; 2) statements

Re: k-shell case statement

2001-08-20 Thread Maxim Berlin
Hello Robert, Tuesday, August 21, 2001, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Ric> What is the best perl example of a k-shell case statement as follows: Ric> case "$VAR1" Ric> in take a look at "Basic BLOCKs and Switch Statements" in perldoc perlsyn Best wishes, Maxim

Re: k-shell case statement

2001-08-20 Thread Brett W. McCoy
On Mon, 20 Aug 2001 [EMAIL PROTECTED] wrote: > What is the best perl example of a k-shell case statement as follows: > > case "$VAR1" > in > 1 ) > statements > ;; > 2) > statements > ;; > * ) > other statements > esac Perl does not have a built in case

calling between perl programs

2001-08-20 Thread Robert_Collins
I am confused about how perl provides for separate perl scripts to talk to each other. In k-shell I can load a function using . . In the file I have defined a function function myfunction { I can execute that function from within any k-shell file by simply myfunction

Turning off warnings causes scripts to fail

2001-08-20 Thread Curtis Poe
Time for me to ask a question instead of answering one. I'm having a problem with a shebang line and multiple versions of Perl. One of our scripts runs fine from the command line but wouldn't run through the browser. We'd type perl somescript.cgi and everthing would run fine. However, w

Re: calling between perl programs

2001-08-20 Thread Jeff 'japhy/Marillion' Pinyan
On Aug 20, [EMAIL PROTECTED] said: >I am confused about how perl provides for separate perl scripts to talk to >each other. In k-shell I can load a function using . . In >the file I have defined a function >function myfunction >{ > >I can execute that function from within any

Re: Turning off warnings causes scripts to fail

2001-08-20 Thread Jeff 'japhy/Marillion' Pinyan
On Aug 20, Curtis Poe said: >One of our scripts runs fine from the command line but wouldn't run >through the browser. We'd type > >perl somescript.cgi > >and everthing would run fine. > >However, when we tried > >./somescript.cgi > >we would get a "No such file or directory" error. The s

RE: Turning off warnings causes scripts to fail

2001-08-20 Thread Gibbs Tanton - tgibbs
So, if you take out the -w but leave in the -T it still will not run? -Original Message- From: Curtis Poe To: [EMAIL PROTECTED] Sent: 8/20/2001 5:17 PM Subject: Turning off warnings causes scripts to fail Time for me to ask a question instead of answering one. I'm having a problem with

Re: calling between perl programs

2001-08-20 Thread Brett W. McCoy
On Mon, 20 Aug 2001 [EMAIL PROTECTED] wrote: > I am confused about how perl provides for separate perl scripts to talk to > each other. In k-shell I can load a function using . . In > the file I have defined a function > function myfunction > { > > I can execute that function fr

Re: Perl script editor for NT/2000

2001-08-20 Thread Mark
I know it's a lot more than just an editor but try Komodo by ActiveState. http://www.activestate.com best, Mark Tom Turpin" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Could someone suggest a good editor for writing scripts with? > > Tom Turpin > CAD Sys

Re: k-shell to Perl

2001-08-20 Thread Michael Fowler
On Mon, Aug 20, 2001 at 01:28:25PM -0500, [EMAIL PROTECTED] wrote: > Is there a conversion product(shareware) that I can use to convert k-shell > code to Perl? Assuming by k-shell you mean ksh, the Korn shell, see perldoc -q 'convert my shell script'. Michael -- Administrator

Re: assistance needed with data gathering/manipulation

2001-08-20 Thread Michael Fowler
On Mon, Aug 20, 2001 at 12:21:29PM -0400, Yacketta, Ronald wrote: > avg1 = (value1 + values2..11) / 10 > avg2 = (value2 + values3..12) / 10 > avg3 = (value3 + values4..13) / 10 > > the math is the easy part, how would I go about cleanly and efficiently > running through a has and doing the above?

Re: formatting

2001-08-20 Thread Michael Fowler
On Mon, Aug 20, 2001 at 12:30:07PM -0400, F.H wrote: > I am trying to format a number so I get it rounded up to 4 decimals then > padded with 2 zeros afterwards, > $test = "142.09879543" ; > $test = sprintf( "%.4f", $test); > The output that I am looking for is > 142.098800 > This will be done vi

Re: assistance needed with data gathering/manipulation

2001-08-20 Thread Paul Johnson
On Mon, Aug 20, 2001 at 04:48:30PM -0800, Michael Fowler wrote: > On Mon, Aug 20, 2001 at 12:21:29PM -0400, Yacketta, Ronald wrote: > > avg1 = (value1 + values2..11) / 10 > > avg2 = (value2 + values3..12) / 10 > > avg3 = (value3 + values4..13) / 10 > > > > the math is the easy part, how would I g

print a string

2001-08-20 Thread Robert_Collins
The following line of code causes 2-lines of output to the file: print LOG "qcfg_dt='$qcfg_dt' \n"; $qcfg_dt contains Monday, August 20, 2001 8:53:26 PM The second quote is written on the next line. In the file the information looks like this: qcfg_dt='Monday, August 20, 2001

Re: print a string

2001-08-20 Thread Curtis Poe
--- [EMAIL PROTECTED] wrote: > The following line of code causes 2-lines of output to the file: > > print LOG "qcfg_dt='$qcfg_dt' \n"; > $qcfg_dt contains Monday, August 20, 2001 8:53:26 PM > The second quote is written on the next line. In the file the information > looks like this:

Re: Turning off warnings causes scripts to fail

2001-08-20 Thread Curtis Poe
--- Jeff 'japhy/Marillion' Pinyan <[EMAIL PROTECTED]> wrote: > I'd say that you've got a ^M at the end of the line. > > cat -vet somescript.cgi > > will tell you for certain. Just verified that there *is* a ^M at the end of the shebang (seems that someone unzipped a script rather than using

Re: Turning off warnings causes scripts to fail

2001-08-20 Thread Brett W. McCoy
On Mon, 20 Aug 2001, Curtis Poe wrote: > Just verified that there *is* a ^M at the end of the shebang (seems > that someone unzipped a script rather than using FTP), but then our > colo went down, so I can't test that this is causing the problem. > However, I just tested it under Cygwin and the ^

Re: assistance needed with data gathering/manipulation

2001-08-20 Thread Michael Fowler
On Tue, Aug 21, 2001 at 03:12:57AM +0200, Paul Johnson wrote: > On Mon, Aug 20, 2001 at 04:48:30PM -0800, Michael Fowler wrote: > > Your "(value1 + values2 .. 11)" syntax can easily be duplicated using > > slices, e.g. @values[1..11]. > > Or, since you only need 10 elements, only use 10, and use