Rob Roudebush wrote at Tue, 11 Jun 2002 03:07:44 +0200:
I have the following code - when someone enters a whatever ' whatever into one of
my forms my
script dies because of the single quote. Aggg... of course the first time I
come across it is
when my boss is testing out the
At 05:05 PM 6/10/02 -0700, drieux wrote:
on http://thecgibin.com/index/faqs.shtml?Perl's_Quote_Words_Feature
you make the assertion
my @peppers = (qw(green red yellow black cayenne));
is this an old perlism since I have always done that as
my @peppers = qw(green red
just define all vars in ur conf file with a scope reslution
eg $global::test = 'hello';
Octavian Rasnita wrote:
Hi all,
Is it possible to use use strict; if I get the variables from a
configuration file?
I've tried:
use strict;
require f:/xxx/config.txt;
#In the configuration
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I have written a e-mail script but cannot get the From part of the
sendmail protical to recognize e-mails with a period in the user name
like [EMAIL PROTECTED] It causes errors. I know if I send
brook/.hurd@gm/.com it will work. I cannot locate
I have written a e-mail script but cannot get the From part of the
sendmail protical to recognize e-mails with a period in the user name
like [EMAIL PROTECTED] It causes errors. I know if I send
brook/.hurd@gm/.com it will work.
/. or \.?
I cannot locate the code required to
parse
-Original Message-
From: Rob Roudebush [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 10, 2002 9:08 PM
To: [EMAIL PROTECTED]
Subject: single quotes kill my scripts
I have the following code - when someone enters a whatever
' whatever into one of my forms my script dies
Bob,
Exactly what does our do? I understand my and even local but have yet
to grasp the our concept.
-Original Message-
From: Bob Showalter [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 11, 2002 9:12 AM
To: 'Octavian Rasnita'; [EMAIL PROTECTED]
Subject: RE: Using strict and
-Original Message-
From: Camilo Gonzalez [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 11, 2002 10:16 AM
To: 'Bob Showalter'; 'Octavian Rasnita'; [EMAIL PROTECTED]
Subject: RE: Using strict and configuration files
Bob,
Exactly what does our do? I understand my and even
So the following are equivalent:
use vars qw(foo)
our $foo =
-Original Message-
From: Bob Showalter [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 11, 2002 9:17 AM
To: 'Camilo Gonzalez'; [EMAIL PROTECTED]
Subject: RE: Using strict and configuration files
-Original Message-
-Original Message-
From: Camilo Gonzalez [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 11, 2002 10:21 AM
To: 'Bob Showalter'; Camilo Gonzalez; [EMAIL PROTECTED]
Subject: RE: Using strict and configuration files
So the following are equivalent:
use vars qw(foo)
our $foo =
I am trying to install CGI.pm-3.01 on my Solaris 2.6 ultra 5 box. Below is
the install process. I am not familiar with the error [test_dynamic]
Error 29 It dose not appear to be fatal because if I force the install
everything appears to be working correctly.
In everything I have read
John, et al --
...and then John Brooking said...
%
...
% Hey! The Camel book (am I right in assuming that is
% the Perl community's nickname for O'Reilly's
It sure is, but ...
% Programming Perl?) says that comment, when used as
% a translator keyword following =for, is by
Whoa! You found
Teddy --
...and then Octavian Rasnita said...
%
% Hi all,
Hello!
%
% Is it possible to use use strict; if I get the variables from a
% configuration file?
%
% I've tried:
%
% use strict;
% require f:/xxx/config.txt;
Have you tried
use f:/xxx/config.txt;
instead? From my reading of
Greetings,
Does anyone have a web based poll script that I can play with? I'm trying to
write my own but am having a very hard time getting it to work. I need one
that just writes the results to a text file.
Thanks
- Naika
http://naikaonline.com
--
To unsubscribe, e-mail: [EMAIL
Greetings;
For many good cgi examples go to
http://nms-cgi.sourceforge.net/
Good Luck!
Dennis
On Tue, 11 Jun 2002, Naika - EV1 wrote:
Greetings,
Does anyone have a web based poll script that I can play with? I'm trying to
write my own but am having a very hard time getting it to
when you're reading the data, create a hash such that each value is
incremented when more than one instance is read. what happens is that key
value pairs are values and counts' of each value.
my %foo = ();
# read data
#
$foo{$data]++; #count data. new values = 1, previously read values
So, I have these two subroutines, match_state() and display_form that I am
having problems with. If the script is run with $state getting the function
argument, it prints a blank pulll-down menu and is able to print Quadrants
covering West Virginia . But, when $state is explicity set to West
Alaric Joseph Hammell wrote at Tue, 11 Jun 2002 18:06:46 +0200:
So, I have these two subroutines, match_state() and display_form that I am having
problems with.
If the script is run with $state getting the function
argument, it prints a blank pulll-down menu and is able to print Quadrants
Jonathan Gines wrote at Tue, 11 Jun 2002 17:29:38 +0200:
...
# read data
#
$foo{$data]++; #count data. new values = 1, previously read values are
incremented by 1
^
}
:-))
Cheerio, Janek
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,
good catch. my mistake. i wrote this snippet before going to a quick meeting.
At 11:31 PM 6/11/02 +0200, Janek Schleicher wrote:
Jonathan Gines wrote at Tue, 11 Jun 2002 17:29:38 +0200:
...
# read data
#
$foo{$data]++; #count data. new values = 1, previously read values
are
Janek Schleicher wrote:
Alaric Joseph Hammell wrote at Tue, 11 Jun 2002 18:06:46 +0200:
So, I have these two subroutines, match_state() and display_form that I am having
problems with.
If the script is run with $state getting the function
argument, it prints a blank pulll-down
On Monday, June 10, 2002, at 09:02 PM, drieux wrote:
On Monday, June 10, 2002, at 07:29 , bob ackerman wrote:
note the ip was slightly different for linksys. it was 192.168.1.1.
above is the ip i use to manually login. the html file is what the
python code names to get the data
I don't know about cgi but I think you can use prinf to add the leading
zero.
printf (Minute %02d.\n, $value);
This should pad the output with a zeroes. The two there means that this is a
two digit number. If you've played with C you will recognise this.
I am also a new and could be dead wrong.
Hi,
My collegue is looking for a solution (Cpan module) to be able to communicate
on a low level with for example a printer-port. He has designed a specific type
of hardware, and needs to send signals to that port.
Currently he is using C to do the work, but wants to rewrite it in Perl.
Any
hi,
I simply wished to strip out all the from a text file. below is the
script and the error that is reported. I cannot see anything wrong, it's
such a simple piece of code! can any one help, are my eyes deceiving me?
thanks,
Adrian
#!/usr/bin/perl -w
open(INPUT, letter.txt) || die can't
oops, ignore last mail, having one of those days, there was an accidental
capitalization :}
_
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx
--
To unsubscribe, e-mail:
hi,
I simply wished to strip out all the from a text file. below is the
script and the error that is reported. I cannot see anything wrong, it's
such a simple piece of code! can any one help, are my eyes deceiving me?
[localhost:~] tor% perl -e 'while() {s/\//g; print;}'
123
123
12345678
while (INPUT){
if(S/\//){
'' does not have to be escaped (this is not an error, it is the capitalized s as you
mentioned)
You can just write this as s///.
$_ = ';
s///g;
print $_\n;
This prints
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,
- Original Message -
From: Adrian Farrell [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 11, 2002 5:25 PM
Subject: invisible syntax error
hi,
I simply wished to strip out all the from a text file. below is the
script and the error that is reported. I cannot see
Greetings,
Is there a CPAN module that I can use to set network settings for WinNT/2K
such as WINS server, DNS server address, that kind of stuff.
I am also looking for a pure perl way of setting the IP address, mask
gw. Currently I am using the command line tool netsh to do this. A pure
+---+
Philip Humeniuk
[EMAIL PROTECTED]
[EMAIL PROTECTED]
++
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
Hi,
I have a Perl script that I need to modify. Presently, its outputting the
results to the screen. Is there a way to also
output the same to a file?
+---+
Philip Humeniuk
[EMAIL PROTECTED]
[EMAIL PROTECTED]
I recently played around with a module Config::General. Very handy.
Try that.
-Original Message-
From: James Taylor [mailto:[EMAIL PROTECTED]]
Sent: 10 June 2002 08:27 PM
To: [EMAIL PROTECTED]
Subject: conf files
I have this app I just wrote, and I wanted to give my users a
-- Forwarded message --
Date: Tue, 11 Jun 2002 13:26:13 +0100 (BST)
From: Alan John Drew [EMAIL PROTECTED]
To: phumes1 [EMAIL PROTECTED]
Subject: Re: Outputting to screen and file.
You want to use something called tee.
The following
will open a pipe to $maxentpath (maxent is a
put your cmd-line arguments within quotes
make sure they do not contain quotes themselves
Bryan R Harris wrote:
Slightly OT, but does anyone know how to pass an empty string to a script
via the command line? I have a script that is invoked via:
rename match-str replace-str list of
run it on cmd-line with
perl perscriptname.pl outputfile
Phumes1 wrote:
Hi,
I have a Perl script that I need to modify. Presently, its outputting the
results to the screen. Is there a way to also
output the same to a file?
And, for completeness:
I'd think that it's not *nix that ignores the , but rather Perl says that
the variable that you assign the value to would then be undefined and just
refuses to work with it.
- use strict; should give you a warning about that.
Best Regards
Anders Holm
Critical Path
if you are on UNIX there is a program called tee that outputs both to screen
and file:
perl perscriptname.pl | tee outputfile
-Original Message-
From: Ramprasad A Padmanabhan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 11, 2002 8:41 AM
To: [EMAIL PROTECTED]
Subject: Re:
I tried the below but the output file was not created. The Perl script has
open(STDOUT, NUL:);
open(STDERR, NUL:);
open(F, CON:);
select(F);$|=1;
.
Should the code below be above or inside the open?
Also, what does the line select(F)... do?
You want to use something called tee.
Can this be simplified with less variables?
sub rcsname {
my $file = shift;
(my $rcsfile = $file) =~ s{somepattern}{andsubstitution};
return $rcsfile;
}
### remember that the original arguement CANNOT be affected.
Nikola Janceski
I have great faith in fools; My friends call it
Hi,
I am currently almost done with my current job.
As I am reviewing my scripts the foreach-loop started to anoy me.
I am afraid this is slowing down the script. Does anyone know a faster way to
do the following :
# --
open(FH, $groupfile);
@usrs = FH;
close FH;
$htusr = (grep
Hi folks!
Well, here's one I'm just not getting to grips with.
I'm parsing a configuration file for an application, and it has a parameter
as such:
Parameter=Value1 Value2 Value3 \
Value4 Value5 Value6 \
Value7 Value8
There are other parameters before and after
David vd Geer Inhuur tbv IPlib wrote:
Hi,
I am currently almost done with my current job.
As I am reviewing my scripts the foreach-loop started to anoy me.
I am afraid this is slowing down the script. Does anyone know a faster way to
do the following :
# --
open(FH, $groupfile);
read the filein...
open(FILE, $file) or die blah blah $!;
undef $/; ## or local $/ if in a BLOCK
$contents = FILE;
close FILE;
$contents =~ s/\\\n//g; # put everything on one line (deletes \ followed by
newline)
foreach (split /\n/, $contents){
## you can figure this part out
Hi Sudarsan,
Sorry forgot to mention that :
$pwuser = ($ENV{'REMOTE_USER'}); ## Apache var
$groupfile is the group-file apache uses to authenticate. Unfortunetly there is
no such thing as :
$group = ($ENV{'REMOTE_GROUP'});
Therefor I have to open the file manualy and set it's
read the filein...
open(FILE, $file) or die blah blah $!;
undef $/; ## or local $/ if in a BLOCK
$contents = FILE;
close FILE;
$contents =~ s/\\\n//g; # put everything on one line (deletes \ followed by
newline)
foreach (split /\n/, $contents){
## you can figure this part out
-Original Message-
From: Anders Holm [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 11, 2002 8:46 AM
To: Ramprasad A Padmanabhan; [EMAIL PROTECTED]
Subject: RE: passing an empty string to a perl script via command line
And, for completeness:
I'd think that it's not *nix that
On Jun 11, Nikola Janceski said:
Can this be simplified with less variables?
sub rcsname {
my $file = shift;
(my $rcsfile = $file) =~ s{somepattern}{andsubstitution};
return $rcsfile;
}
### remember that the original arguement CANNOT be affected.
What makes you think that:
sub rcsname {
Hi Bob.
Well, all I can now say is DOH!. Oooppsie, my mistake.. ;) Too green on
this yet.. Thanks for clearing up my confusions!
Cheers!
Best Regards
Anders Holm
Critical Path Technical Support Engineer
--
Tel USA/Canada: 1
On Jun 11, David vd Geer Inhuur tbv IPlib said:
open(FH, $groupfile);
@usrs = FH;
close FH;
$htusr = (grep {/htuser: /} @usrs)[0] ;
$phi = (grep {/phil: /} @usrs)[0] ;
$al = (grep {/all: /} @usrs)[0] ;
That looks wasteful to me. You're looping over the data FOUR[1] times,
instead of just
David Vd Geer Inhuur Tbv Iplib wrote at Tue, 11 Jun 2002 15:17:57 +0200:
Hi,
I am currently almost done with my current job.
As I am reviewing my scripts the foreach-loop started to anoy me.
It should not be the only thing, but let's talk about it later.
I am afraid this is slowing
See inline comments:
-Original Message-
From: Tor Hildrum [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 11, 2002 12:01 PM
To: Perl
Subject: Re: Putting values into hash
read the filein...
open(FILE, $file) or die blah blah $!;
undef $/; ## or local $/ if in a BLOCK
Correct. I want to output to both but how?
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
List-Post: mailto:[EMAIL PROTECTED]
List-Help: mailto:[EMAIL PROTECTED]
List-Unsubscribe: mailto:[EMAIL PROTECTED]
List-Subscribe: mailto:[EMAIL PROTECTED]
Delivered-To: mailing list [EMAIL
From: phumes1 [EMAIL PROTECTED]
I have a Perl script that I need to modify. Presently, its outputting
the results to the screen. Is there a way to also output the same to a
file?
You might want to try Ron Wantock's Local::TeeOutput (
From: Nikola Janceski [EMAIL PROTECTED]
To: Beginners (E-mail) [EMAIL PROTECTED]
Subject:Can you make it use one or more less vars?
Date sent: Tue, 11 Jun 2002 09:17:38 -0400
Can this be simplified with less variables?
sub
On Tuesday, June 11, 2002, at 06:39 , Anders Holm wrote:
[..]
I'm parsing a configuration file for an application, and it has a
parameter
as such:
Parameter=Value1 Value2 Value3 \
Value4 Value5 Value6 \
Value7 Value8
There are other parameters before and
From: Bob Showalter [EMAIL PROTECTED]
The parsing of the command line and preparation of the argument list
is a function of the shell or command interpreter. Perl just takes the
argument list given to it via the execve() call.
This is not true under Windows.
There the
-Original Message-
From: Jenda Krynicky [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 11, 2002 10:12 AM
To: [EMAIL PROTECTED]
Subject: RE: passing an empty string to a perl script via command line
From: Bob Showalter [EMAIL PROTECTED]
The parsing of the
I am trying to install CGI.pm-3.01 on my Solaris 2.6 ultra 5 box. Below is
the install process. I am not familiar with the error [test_dynamic]
Error 29 It dose not appear to be fatal because if I force the install
everything appears to be working correctly.
In everything I have read
On Tuesday, June 11, 2002, at 07:12 , Jenda Krynicky wrote:
From: Bob Showalter [EMAIL PROTECTED]
The parsing of the command line and preparation of the argument list
is a function of the shell or command interpreter. Perl just takes the
argument list given to it via the
I really have to thank you all !!
I got so many replies, with hardcore answers. I need some time for that.
But I really apreciate all of your excellent help !
Regs David
One day, I hope to be as good as the best... One day..
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
Hello,
I'm a sys-admin on an AIX (4.3) machine, and I'm trying to work
with a vendor program that doesn't behave very nicely. Basically,
if a user's connection to the server is inappropriately severed
the application keeps right on chugging, leaving the user
logged in. By inappropriately
Interesting! It looks like my problem comes from the way I'm reading
arguments off the command line. I've been using:
$match = shift || die(Usage: rename match-expr replace-expr [filenames]
\n example: rename txt html *.txt\n);
$replace = shift || die(Usage: rename match-expr
-Original Message-
From: Bryan R Harris [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 11, 2002 11:50 AM
To: [EMAIL PROTECTED]
Subject: RE: passing an empty string to a perl script via command line
Interesting! It looks like my problem comes from the way I'm reading
Hi all,
I have the following code, which can port 1 image to browser,
when I use Sambar Server for Win32 System.
#!C:\perl\bin\perl.exe
print Content-type: image/jpeg\r\n\r\n;
$| = 1;
open (FILE, 'C:/my/param/image.jpg');
binmode (FILE) ; binmode(STDOUT);
while (FILE) { print $_ } close
Hi,
I thought of another way possibly...of doing this.
Is there a way through environment variables (or someother way) to check to
see if the perl script is being run via command prompt or from a browser
(web interface)?
This way if someone runs the script from a command prompt I output it
Oh, thank you Bob!
This has been annoying me since almost day 1 (almost 3 months now). You
have lifted a great burden off my shoulders.
I have a feeling I'm going to be polishing your car in the next life... =)
- B
__
-Original Message-
From: Bryan R Harris
From: drieux [EMAIL PROTECTED]
On Tuesday, June 11, 2002, at 07:12 , Jenda Krynicky wrote:
From: Bob Showalter [EMAIL PROTECTED]
The parsing of the command line and preparation of the argument
list is a function of the shell or command interpreter. Perl just
takes the
Hi,
There should be many ENV that would only be set if you are using a browser, but
one of them might be HTTP_USER_AGENT.
Here is a tested example :
#
if($ENV{'HTTP_USER_AGENT'}) {
print Content-type: text/html\n\n;
print You are using a browser;
}
else { print You have started this
Weird.
I put the below lines in my perl script and ran it from the command prompt
and from a web browser yet the results are telling me
that You have started this script from the command prompt
Why?
Is the HTTP_USER_AGENT check not correct?
Date: Tue, 11 Jun 2002 18:35:16 +0200 (METDST)
Hang on...I have a batch file that is being executed. In the batch file
contains my perl script that I'm executing so the below does work.
If anyone is familiar with Allaire Cold FUsion I'm using the cfexecute to
run a batch file which in turn runs the perl script.
How do I get around
I am not in a position to offer advice but would love to see it .
-Original Message-
From: Akens, Anthony [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 11, 2002 10:48 AM
To: [EMAIL PROTECTED]
Subject: Killing Idle Users
Hello,
I'm a sys-admin on an AIX (4.3) machine, and I'm trying
Here's the shell script, for those interested. Sorry for the
lack of comments, but it's not to hard to figure out with a
little patience...
---
PTS=`w -l | grep pts | cut -c10-15`
echo /home/danb/killemresults
RIGHTNOWDATE=`date`
echo $RIGHTNOWDATE /home/danb/killemresults
echo
On Tuesday, June 11, 2002, at 09:58 , phumes1 wrote:
Weird.
I put the below lines in my perl script and ran it from the command
prompt and from a web browser yet the results are telling me
that You have started this script from the command prompt
Why?
Is the HTTP_USER_AGENT check not
Here is the site for Dave Roth and his sys admin via Perl:
http://www.roth.net/
Wags ;)
-Original Message-
From: Akens, Anthony [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 11, 2002 10:14
To: [EMAIL PROTECTED]
Subject: RE: Killing Idle Users
Here's the shell script,
I have the following code, which can port 1 image to browser,
when I use Sambar Server for Win32 System.
#!C:\perl\bin\perl.exe
print Content-type: image/jpeg\r\n\r\n;
$| = 1;
open (FILE, 'C:/my/param/image.jpg');
binmode (FILE) ; binmode(STDOUT);
while (FILE) { print $_ } close
howdy all,
I was wondering if you could help me, I have a perl script that executes a
SQL statement:
'SELECT prop_rank FROM main ORDER BY prop_rank DESC'
This returns many records but all i am interested in is the highest rank
hence the 'ORDER BY prop_rank DESC'.
I then retreive the highest
OK...thanks for all the great examples but because I'm running either
manually from a command prompt our from a batch file via web browser they
are both being executed as a command prompt. This is how ColdFusion sees it.
SoI have a batch file with the following line. Note: The runme.exe
Something like this perhaps ?:
#!/usr/bin/perl -w
use strict;
my $USER_IDLE = 40;
my @input = qx!w -l!;
shift @input;
shift @input;
foreach my $entry ( @input )
{
my ($user, $port, undef, $idle) = split('\s+', $entry);
if ( $idle =~ /^\d+$/ $idle 0 )
{
On Tue, 11 Jun 2002, A Taylor wrote:
snip
$rank = $sth1-fetchrow_array();
Now, my question is this: is this the right way to retreive just 1 record,
using fetchrow_array(); ??? or is there a more acceptable way. This does
work, its just the 'array()' part is making me a little uneasy.
Uh,... no (atleast IMHO)
SELECT MAX(prop_rank)...
would be a more efficient approach
HTH
A Taylor [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
howdy all,
I was wondering if you could help me, I have a perl script that executes a
SQL statement:
'SELECT
Hi folks,
Need help with the connection data source for MS SQL server.
Thanks
Eric
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
What kind of help? What have you tried so far?
What platform are you running Perl on?
More info would be helpful...
-Joe
--- learn perl [EMAIL PROTECTED] wrote:
Hi folks,
Need help with the connection data source for MS SQL server.
Thanks
Eric
--
To unsubscribe, e-mail: [EMAIL
Hi,
How can fetch all the environment variables and print them to the screen?
+---+
Philip Humeniuk
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Thanks!
The only thing I saw to change was the line
if ( $idle =~ /^\d+$/ $idle 0 )
to
if ( $idle =~ /^\d+$/ $idle $USER_IDLE )
I'm going to do some testing to be safe, but will probably
put this in place soon - and the great part is that I
understand *most* of it!
Tony Akens
[EMAIL
On Jun 11, phumes1 said:
How can fetch all the environment variables and print them to the screen?
The %ENV hash holds all the environment variables.
If you know how to use a hash, you can display all the environment
variables.
--
Jeff japhy Pinyan [EMAIL PROTECTED]
I have a problem...I don't know how to use a hash. :-(
At 02:50 PM 6/11/2002 -0400, you wrote:
On Jun 11, phumes1 said:
How can fetch all the environment variables and print them to the screen?
The %ENV hash holds all the environment variables.
If you know how to use a hash, you can
Sorry, I got it already. I just need to know the standard connection
string for ODBC connection.
Eric
On Tue, 11 Jun 2002, Joe Raube wrote:
What kind of help? What have you tried so far?
What platform are you running Perl on?
More info would be helpful...
-Joe
--- learn perl [EMAIL
couldn't he do:
my @allenv = map { [$_, $ENV{$_} ] } keys %ENV;
local $ = --;
foreach my $env (@allenv){
print @{$env}\n;
}
-Original Message-
From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 11, 2002 2:50 PM
To: phumes1
Cc: [EMAIL PROTECTED]
on Tue, 11 Jun 2002 18:57:46 GMT, Nikola Janceski wrote:
couldn't he do:
my @allenv = map { [$_, $ENV{$_} ] } keys %ENV;
local $ = --;
foreach my $env (@allenv){
print @{$env}\n;
}
Personally, I prefer
print $_--$ENV{$_}\n for (keys %ENV);
--
felix
--
To
WHen I execute my script with the code below I get the following error:
Missing $ on loop variable at runme.pl line 38.
At 02:57 PM 6/11/2002 -0400, you wrote:
couldn't he do:
my @allenv = map { [$_, $ENV{$_} ] } keys %ENV;
local $ = --;
foreach my $env (@allenv){
print @{$env}\n;
On Jun 11, Nikola Janceski said:
my @allenv = map { [$_, $ENV{$_} ] } keys %ENV;
local $ = --;
foreach my $env (@allenv){
print @{$env}\n;
}
That's a lot of work, and Philip has said he doesn't know how to use a
hash.
for (sort keys %ENV) {
print $_ = '$ENV{$_}'\n;
}
or even
Where can I learn about hashes?
At 01:58 PM 6/11/2002 -0500, you wrote:
Don't ask a question like this again... What you should really be asking
is where you can learn about hashes. never ask someone to do your work
for you. Anyway, here...
print $_ is $ENV{$_}\n for (sort keys %ENV);
On
Found another problem...
The line
my @inputP = qx!ps -e |grep $port!;
is matching a bit overzealously... For instance,
if $port = pts/6 it matches (and therefore would kill)
not only processes on port pts/6, but also pts/61, pts/62
etc.
Is there a better way to limit that?
Tony Akens
Don't count on me for thinking today.
Something my PDE professor said once in class before midterms, and that's my
condition this week.
-Original Message-
From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 11, 2002 3:08 PM
To: Nikola Janceski
Cc: phumes1;
On Tue, Jun 11, 2002 at 05:49:53PM +, A Taylor wrote:
'SELECT prop_rank FROM main ORDER BY prop_rank DESC'
This returns many records but all i am interested in is the highest rank
hence the 'ORDER BY prop_rank DESC'.
I then retreive the highest rank like so:
$rank =
Yes. If you are using Apache, you can just do it there.
-James
-Original Message-
From: Thiago Ferreira [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 11, 2002 12:39 PM
To: beginners-perl
Subject: IP
Hi
I need to control the access for some files in my httpd and I'd like to
Hi,
I'm trying to use the Net::Telnet module to talk
to a port a remote machine. There is an application
on the remote machine (on a specific port) that
takes a username/group as input and returns whether
the user is a member of said group. No logging in
is done at all.
An example (done from
Tony --
...and then Akens, Anthony said...
%
% Found another problem...
%
% The line
% my @inputP = qx!ps -e |grep $port!;
% is matching a bit overzealously... For instance,
% if $port = pts/6 it matches (and therefore would kill)
% not only processes on port pts/6, but also pts/61,
I'm trying to place a variable in the spot of an argument when exectuting a command
with open. Here's what I'm trying to do.
open(COMMAND,home/usr/usrname command $argument|);
while (COMMAND)
print $_; #print output
It's not accepting the $argument variable i'm putting in.
1 - 100 of 124 matches
Mail list logo