Re: foo-bar

2002-09-02 Thread Gary Stainburn

On Monday 02 September 2002 5:54 am, Alex B. wrote:
 Hello list,

   this is a very simple question:

   what does FOO or BAR or FOOBAR mean???

   I've seen it on t-shirts (perl), my programming perl book,
   programming CGI with perl, and even learning perl...


   now, does FOO have any meaning?

   - sounds almost like: whuzup, foo(l)!  :)

Have a look at:

http://www.tuxedo.org/~esr/jargon/

Ttis is a very good source of information such highly technical terms as foo 
and bar
-- 
Gary Stainburn
 
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: foo-bar

2002-09-02 Thread Steve Grazzini

Alex B. [EMAIL PROTECTED] wrote:
 
   this is a very simple question:
 
   what does FOO or BAR or FOOBAR mean???
 

  http://info.astrian.net/jargon/terms/f/foo.html

-- 
Steve

perldoc -qa.j | perl -lpe '($_)=m((.*))'

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Analyzing a form

2002-09-02 Thread Soheil Shaghaghi

I have a form with 7 fields, each having it's own dropdown menu.
The fields are:
option1: (1, 2)
option2: (1, 2)
option3: (1, 2)

option4: (Yes, No)
option4A: (1, 2)

option5: (Yes, No)
option6: (1, 2, 3, 4, 5,6)


I am using this form to evaluate the eligibility of the user based on the
input.

The user passes in the following conditions:
There are 2 simple requirements:
One of the fields (options1, option2, option3,option4A) are equal to 1
and (option5=Yes or option62)

So, we have:
Option1=1 and (option5=Yes or option62)
Option1=2 and option2=1 and (option5=Yes or option62)
Option1=2 and option3=1 and (option5=Yes or option62)
Option1=2 and option4=Yes and option4A=1 and (option5=Yes or option62)

The user fails in the following conditions:
Option5=No and Option62
Option1=2 and Option2=2 and Option3=2 and Option4=2

Now, here is what I am trying to get after the data is analyzed:
All I want is to display a page that says Passed, or Failed with a message.

Below is what I have so far:
As you can see it's not completed yet, but I am not sure if I am doing it
correctly and if there is another (better or easier way), and I am also
confusing myself!

sub html_fail {
   if (($option5 eq Yes and $option1 eq 1) || ($option5 eq Yes and
$option2 eq 1) ||($option5 eq Yes and $option3 eq 1) || ($option5 eq
Yes and $option4A eq 1)) {
print END_HTML;
good
END_HTML
}
elsif ($option5 eq No and $option6  1 and $option1 eq 2) {
print END_HTML;
good
END_HTML
}
else {
print END_HTML;
bad
END_HTML
}
}

Any help would be greatly appreciated.










-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Data check

2002-09-02 Thread zentara

On Sun, 1 Sep 2002 11:25:50 -0700, [EMAIL PROTECTED] (Soheil Shaghaghi)
wrote:

Hi everyone,
I have a form with a list of countries (dropdown menu)
The countries are divided into 2 sections:
For simplicity lets' sue these sets:
Set 1: U.S. England, Canada, Germany
Set 2: India, Japan, France, Saint Lucia, Northern Ireland
The dropdown menu consists of the entire list.

When the user submits the form, I want to check the country against the 2
sets, and point the user to different sections depending on which set the
country is chosen.

I know I can do this simple enough and just use the values 0, and 1 for each
country in each set and check based on those values.
But since I actually want to use the country somewhere else in the program,
I am looking for an alternative way to do this.
Can anyone please tell me how to do this?

You have not made it entirely clear what you want to do, but I
will try to answer your question.

You want a user to select a country from the list, and you want
to know if the country is in set1 or set2, and then later in the program
use the $country value.  

How about:
 
my @arr= qw(U.S., England, Canada, Germany);
my $country = param(COUNTRY);
if ( grep $_ == $country, @arr ) {my $countryset=1}
} else {my $countryset=2}
}

#later in the program you can:
if ($countryset == 1) { print My country is $country in set 1\n}

if ($countryset == 2) { print My country is $country in set 2\n}









-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: How to make a hyperlink an argument for a CGI script

2002-09-02 Thread zentara

On Sun, 1 Sep 2002 20:35:45 -0700 , [EMAIL PROTECTED] (David
Nazary) wrote:

Hi,

In the following web page how can I make foo to become an argument to
cgi-bin\script.pl script when I click on foo?

body

pa href=cgi-bin/script.plfoo/a/p

/body

Currently the script takes  as an argument when I click on foo. Any
suggestion are appreciated.

I don't know what you want to accomplish with this method, but you can
try:
pa href=cgi-bin/script.pl/foofoo/a/p

or

pa href=cgi-bin/script.pl?foo=foofoo/a/p

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: How to make a hyperlink an argument for a CGI script

2002-09-02 Thread Jim Lundeen

use CGI;
$form  = new CGI;

The example in my first email had an error...   (this is a short version of an
email I sent back to David directly)...



Nazary, David wrote:

 Jim,

 In a web page I have a list of names (ClearCase VOBs) that I like to link to
 a single script. When I click on any one of those names they should become
 an argument to that script. The script will then fetch certain data (Epoch
 numbers) for that name.

 I think what you and Rasnita suggested may very well be the solution but now
 I have to install the package new as I got some error to that effect.

 Thanks again.
 David

 -Original Message-
 From: Jim Lundeen [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, September 01, 2002 8:44 PM
 To: Nazary, David
 Subject: Re: How to make a hyperlink an argument for a CGI script

 i'm not sure that i understand what you are asking.  are you asking how to
 pass field values in to a perl script from a text link?

 if so,

 a href=script.pl?name=valuename2=value2Foo/a

 Within the scipt,

 use CGI;
 $form = new-CGI;

 $field1= $form-param(field1);
 $field2= $form-param(field2);

 etc...

 Nazary, David wrote:

  Hi,
 
  In the following web page how can I make foo to become an argument to
  cgi-bin\script.pl script when I click on foo?
 
  body
 
  pa href=cgi-bin/script.plfoo/a/p
 
  /body
 
  Currently the script takes  as an argument when I click on foo. Any
  suggestion are appreciated.
 
  Thanks
  David Nazary
 
  --
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




How to protect Perl code

2002-09-02 Thread Alex Agerholm

Hi,

Can anyone give me a good way to protect my Perl code.
I am writing a CGI application in Perl that I am going to sell - therefore I
would like to protect my code in such a way that it is not that easy to copy
the code and reuse/resell/distribute it.
Does anyone have a good sugestion howto do this ?

Regards
Alex



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Password protection without the use of .htaccess

2002-09-02 Thread Alex Agerholm

Hi,

Can anyone direct me to some good source code example, on how to password
protect some CGI scripts.
As I want the solution to be portable, I do not want to use .htaccess.
I would prefer som code to make a login page and verify the username and
password against a SQL database, then set a cookie with an ID of the logged
in user. And on all protected scripts simply call a check function that
lookup the ID in the SQL database to see if it is legal and if not redirects
to the login page.
Any other sugestions are welcome



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


general question

2002-09-02 Thread kkempess

do you know an web place where programmers can find a job? I'm looking for an web 
place where the companies ask for making a program. do you know, a programmer can sign 
up for that job and receive some money for making that program...
thank you

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Redirect and cookies

2002-09-02 Thread Ovid

--- Alex Agerholm [EMAIL PROTECTED] wrote:
 Hi Curtis,
 
 Thanks for your help, I am actually on IIS so you have saved me a lot of
 troubles.
 Do you know how to work around this ?
 From the microsoft article below it seems like running in nph mode should
 solve it but redirect(-uri = xxx.cgi, -cookie = $cookie, -nph = 1) does
 not solve it and neither does using the -nph pragma in the the use CGI line.
 
 Regards
 Alex

Alex,

I would telnet to port 80 and manually request the data from your script.  That way, 
you can see
the headers that are being sent.  Or, you could just write a short LWP script to do 
this (see
perldoc LWP).  Yet another option is to simply run the script from the command line 
(while running
as -noh), but this has the problem that you can't see if your script is doing anything 
odd.

Also, just to make sure you're handling it correcty, with IIS, the script name must 
begin with
nph-.

Cheers,
Curtis Ovid Poe

=
Ovid on http://www.perlmonks.org/
Someone asked me how to count to 10 in Perl:
push@A,$_ for reverse q.e...q.n.;for(@A){$_=unpack(q|c|,$_);@a=split//;
shift@a;shift@a if $a[$[]eq$[;$_=join q||,@a};print $_,$/for reverse @A

__
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




free host

2002-09-02 Thread kkempess

I'm looking for a free trusted perl web hosting. if you know some please let me know.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: How to make a hyperlink an argument for a CGI script

2002-09-02 Thread Connie Chan

print a href=http://site/page/script.pl?me=I\you=UClick Me/a;
or
print a href='http://site/page/script.pl?me=I\you=U'Click Me/a;
or 
print a href=\http://site/page/script.pl?me=I\you=U\;Click Me/a;
or 
print 'a href=http://site/page/script.pl?me=Iyou=U;Click Me/a';

but beware what you want is /cgi-bin/ or cgi-bin/ .The first one is 
lookup the CGI root from the server, while the second one is lookup 
the script from the current folder.

Rgds,
Connie

- Original Message - 
From: Nazary, David [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, September 02, 2002 11:35 AM
Subject: How to make a hyperlink an argument for a CGI script


 Hi,
 
 In the following web page how can I make foo to become an argument to
 cgi-bin\script.pl script when I click on foo?
 
 body
 
 pa href=cgi-bin/script.plfoo/a/p
 
 /body
 
 Currently the script takes  as an argument when I click on foo. Any
 suggestion are appreciated.
 
 Thanks
 David Nazary
 
 -- 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: How to protect Perl code

2002-09-02 Thread fliptop

On Mon, 2 Sep 2002 at 20:33, Alex Agerholm opined:

AA:Can anyone give me a good way to protect my Perl code. I am writing a
AA:CGI application in Perl that I am going to sell - therefore I would
AA:like to protect my code in such a way that it is not that easy to copy
AA:the code and reuse/resell/distribute it. Does anyone have a good
AA:sugestion howto do this ?

a google search on 'hiding perl code' gave me almost 25,000 hits.  this 
topic has been discussed to death on several perl lists.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Password protection without the use of .htaccess

2002-09-02 Thread fliptop

On Mon, 2 Sep 2002 at 20:33, Alex Agerholm opined:

AA:Can anyone direct me to some good source code example, on how to password
AA:protect some CGI scripts.
AA:As I want the solution to be portable, I do not want to use .htaccess.
AA:I would prefer som code to make a login page and verify the username and
AA:password against a SQL database, then set a cookie with an ID of the logged
AA:in user. And on all protected scripts simply call a check function that
AA:lookup the ID in the SQL database to see if it is legal and if not redirects
AA:to the login page.

if you're running mod_perl, there's apache::authticket.  it does exactly 
what you want.

http://search.cpan.org/author/MSCHOUT/Apache-AuthTicket-0.31/



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Analyzing a form

2002-09-02 Thread fliptop

On Mon, 2 Sep 2002 at 06:20, Soheil Shaghaghi opined:

[snip]
SS:Now, here is what I am trying to get after the data is analyzed:
SS:All I want is to display a page that says Passed, or Failed with a message.
SS:
SS:Below is what I have so far:
SS:As you can see it's not completed yet, but I am not sure if I am doing it
SS:correctly and if there is another (better or easier way), and I am also
SS:confusing myself!

i wrote the form checker tutorial for this very purpose.

http://www.peacecomputers.com/form_checker/



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Analyzing a form

2002-09-02 Thread Exile



 I have a form with 7 fields, each having it's own dropdown menu.
 The fields are:
 option1: (1, 2)
 option2: (1, 2)
 option3: (1, 2)
 
 option4: (Yes, No)
 option4A: (1, 2)
 
 option5: (Yes, No)

Suggest using 1, 0 instead for 1,2 for all the above.
and default selected 0, then in your main script,
you can simple say  :

if (not $option1) { do_sth } # when selected 0
if ($option1) { do_sth } # when selected 1

 option6: (1, 2, 3, 4, 5,6)
 
 
 I am using this form to evaluate the eligibility of the user based on the
 input.
 
 The user passes in the following conditions:
 There are 2 simple requirements:
 One of the fields (options1, option2, option3,option4A) are equal to 1
 and (option5=Yes or option62)

print Content-type: text/html\n\n;

# Do sth to get those vals

if (($opt1 or $opt2 or $opt3 or $opt4) and ($opt5) and ($opt6 = 2 ))
{ print Success } else { print Fail }


 
 So, we have:
 Option1=1 and (option5=Yes or option62)
 Option1=2 and option2=1 and (option5=Yes or option62)
 Option1=2 and option3=1 and (option5=Yes or option62)
 Option1=2 and option4=Yes and option4A=1 and (option5=Yes or option62)

I don't understand. =)

 
 The user fails in the following conditions:
 Option5=No and Option62
 Option1=2 and Option2=2 and Option3=2 and Option4=2

Actaully, I think you don't need to do it on twice, say,
if not ok, that is fail, fullstop.

 
 Now, here is what I am trying to get after the data is analyzed:
 All I want is to display a page that says Passed, or Failed with a message.
 
 Below is what I have so far:
 As you can see it's not completed yet, but I am not sure if I am doing it
 correctly and if there is another (better or easier way), and I am also
 confusing myself!
 
 sub html_fail {
if (($option5 eq Yes and $option1 eq 1) || ($option5 eq Yes and
 $option2 eq 1) ||($option5 eq Yes and $option3 eq 1) || ($option5 eq
 Yes and $option4A eq 1)) {

for numeric check, use ==, =, =, !=


[...]

Rgds,
Connie


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Resolved - RE: How to make a hyperlink an argument for a CGI script

2002-09-02 Thread Nazary, David

I finally got my script to do what I needed. Thanks a lot to all those who
helped me out.

In case interested here is the resolution:

pa href=cgi-bin/script.pl?id=\Acura\Acura/a/p

and the script.pl is:

use CGI;
$q = new CGI;
$VOB = $q - param ('id');
system(multitool,lsepoch,\-invob,$VOB);

Regards
David Nazary

-Original Message-
From: Octavian Rasnita [mailto:[EMAIL PROTECTED]]
Sent: Sunday, September 01, 2002 8:46 PM
To: Nazary, David
Subject: Re: How to make a hyperlink an argument for a CGI script


Don't end with .pl but put a link that include a query string like:

a href=/cgi-bin/script.plid=foofoo/a

Then in your script use:

use CGI;
my $q = new CGI;
my $foo = $q - param ('id');

Your foo string is in the $foo now.

Teddy's Center: http://teddy.fcc.ro/
Mail: [EMAIL PROTECTED]

- Original Message - 
From: Nazary, David [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, September 02, 2002 6:35 AM
Subject: How to make a hyperlink an argument for a CGI script


 Hi,
 
 In the following web page how can I make foo to become an argument to
 cgi-bin\script.pl script when I click on foo?
 
 body
 
 pa href=cgi-bin/script.plfoo/a/p
 
 /body
 
 Currently the script takes  as an argument when I click on foo. Any
 suggestion are appreciated.
 
 Thanks
 David Nazary
 
 -- 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]