Re: Search for a string

2003-02-04 Thread Dennis Stout
d but at the moment, I'm trying to get some sleep.. Good Night, Dennis Stout > I am not handling this at the Apache level because I have about 40+ > different sites running on this one box. I want to be able to run server > wide statistics from the 'master' log file, then I

Re: Printing arrays without empty variables

2003-02-04 Thread Dennis Stout
> I'm just learning perl and would like to know how to print the contents of > an array, without printing any of the elements in the array that might be > empty. foreach (@days) { unless =~ // print; } I do believe will do it. Dennis Stout > > For instance: > >

Re: How can I send Variables ?

2003-02-20 Thread Dennis Stout
> www.mysite.com/index.cgi?id=$var&name=$var2 > > But How can I send a varibles to another page ? > I need to send this Two variables to index.cgi , but > When I try it ,none > of Them seems to be reiceived . use CGI; use strict; $q=new CGI(); $id=$q->param('id'); $name=$q->param('name'); Then d

Re: NULL insertion

2003-02-24 Thread Dennis Stout
ARIABLE=NULL, but I'd need to know what kind of database you were using before I could pound out some perl code for you. You cna probably do the code anyways, so I don't feel so bad :) Anyways, thats the SQL syntax. Dennis Stout -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Perl/CGI with FRAMES

2003-03-03 Thread Dennis Stout
> Working with Frames will be messy any way you cut it. So messy in fact, I found SSI to be a much nicer way to do things. That's my 2 cents! Dennis -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: CGI::FormBuilder

2003-03-14 Thread Dennis Stout
Try this: $form->submit( -name => 'Next', -value => 'Next', ), Swap submit out for hte various types of buttons. Reset, and what not. Dennis - Original Message - From: "Rob Benton" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED

Re: searching a string

2003-03-18 Thread Dennis Stout
What I would do is elliminate all the extra white space; s/\w/ /g; s/\r\n/ /g; then do a match. /the lucky coin/; Dennis - Original Message - From: "mark sony" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, March 18, 2003 02 13 Subject: searching a string > Hi > i am sear

Re: Good Perl cgi book?

2003-03-18 Thread Dennis Stout
> Get the mother of all perl books: > > "Programming Perl" (from O'reilly) > by Larry Wall (perl creator), Tom Christainsen, and Jon Orwant. That is the mother of all perl books. It's also more of a reference book than anything else. Altho if you're that type of learner, it'll be a great read. I

Re: question about perl.

2003-03-27 Thread Dennis Stout
gram"; } else { system "otherprogram"; } If you DO want to keep the output of hte program, backticks. if (condition == true) { my $output = `program`; } else { my $output = `otherprogram`; } Hope it helps. Dennis Stout - Original Message - From: "Luinrandir Hernsen"

Fw: question about perl.

2003-03-27 Thread Dennis Stout
Sorry, for some reason I'm blocked from emailing RoadRunner accounts, by Roadrunner. Here is a forward of an email I jsut sent you personally but bounced. It's Perl CGI related, so it's not offtopic for hte list ... but oculd be an annoyance for some, possibly. Dennis

Fw: question about perl.

2003-03-27 Thread Dennis Stout
. I just sent myself an email. Dennis Stout S.T.O.U.T. = Synthetic Technician Optimized for Ultimate Troublshooting - Original Message - From: "Dennis Stout" <[EMAIL PROTECTED]> To: "Dennis Stout" <[EMAIL PROTECTED]> S

Re: how to compare to string variables

2003-06-04 Thread Dennis Stout
> Or even if you don't want them to be identical but just similar in that they > contain the same string somewhere within the variable, i.e. > > $a2 = 'Lambott'; > $a3 = 'fooLambottblah'; > > if ($a3 =~ /$a2/) { > # do something > } > else { > # do something else > } > > or what if you want to m

Re: perl-modules

2003-06-23 Thread Dennis Stout
I'm going to step out on a limb and assume that use *(); would be asking too much from a typeglob :D Try using File::Find as well as poking through @INC, and see what happens. Dennis Stout S.T.O.U.T. = Synthetic Technician Optimized for Ultimate Troublshooting - Original Me

Re: http_referer question

2003-06-26 Thread Dennis Stout
ine, then when they hit submit have it post back into the same script which would then see the cookie and do a small weak authentication based on it, then return the results of the form. I would make a smaple but it's only 7am here, I should be sleeping still... Dennis Stout -- To un

Re: Why should I create an object?

2003-06-26 Thread Dennis Stout
> Bare in mind that I am still a beginner at coding. Why is it "good > practice" to create an object when using CGI, rather than just diving > in? Maintainability. > For example: > > use CGI ':standard'; > my $q=new CGI; > my $input=$q->param('input'); > > and > > use CGI ':standard'; > my $input

Re: Why should I create an object?

2003-06-26 Thread Dennis Stout
. Thank you Randall Schwartz, Larry Wall, and O'Reilly! Dennis P.S. Sorry if I slaughtered any names in there. I did my best :P - Original Message - From: "Dennis Stout" <[EMAIL PROTECTED]> To: "Greenhalgh David" <[EMAIL PROTECTED]>; <[EMAIL PROT

Cookies and mod_perl

2003-06-29 Thread Dennis Stout
Is there any difference in setting cookies between operating under just general CGI and when using an Apache webserver and mod_perl? I got a program I'm writing that generates every page it dishes out on the fly, dynamically. If I can stay away from doing a use CGI;, I would love to. Thanks, Den

Re: Re: dynamic update part of a table

2003-06-29 Thread Dennis Stout
Use HTML::Templates and a CGI script to generate the content of your table cell. Your table cell would include merely and your perl code would be something of hte sort of: my $news = (sql query code goes here...); my $template = HTML::Template->new( filename => "$Template_Dir/$tmpl_file",

Re: Re: dynamic update part of a table

2003-06-29 Thread Dennis Stout
You coudl probably remove the die_on_bad_params section on that. I was in a haste copying that code :P Dennis - Original Message - From: "Dennis Stout" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Sunday, June 29, 2003 22 26 Sub

Re: Re: dynamic update part of a table

2003-06-29 Thread Dennis Stout
> > my $news = (sql query code goes here...); > > > > my $template = HTML::Template->new( > > filename => "$Template_Dir/$tmpl_file", > > die_on_bad_params => 0, > > ); Sorry, guess I forgot to change $Template_Dir/$tmpl_file to "your_html_file.tmpl". In your table cell, put exactly this: th

Re: Re: dynamic update part of a table

2003-06-29 Thread Dennis Stout
tem","blah","dill-yo", "table"); and get those items from "table" :D Object Oriented Programming, mm S.T.O.U.T. = Synthetic Technician Optimized for Ultimate Troublshooting - Original Message - From: "Dennis Stout" <[EMAIL

Re: Re: dynamic update part of a table

2003-06-30 Thread Dennis Stout
> Yeah, I think I am finally getting this... > so in my template.html file, I write this: > ...* > > and in a perl script, (I am not using sql, in fact, I > am just reading from a text file) I read from the > file, assign the proper html tag value* to a variable > $quote_of_the_day* > and then I us

Re: Re: dynamic update part of a table

2003-06-30 Thread Dennis Stout
> okay...here is another point...say this is my main > page, I want the user to c it when it browses to > http://localhost/ > if I am using an Apache2 for win32 server...is it > possible for the server to call my perl script when > the user browses to http://localhost/ (no localhost of > course) ..

Re: Re: dynamic update part of a table

2003-06-30 Thread Dennis Stout
> I totally agree...the only reason I installed 2.0 in > the first place is I didn't want the trouble of > compiling and installing the WebDAV module...which as > it turns out, never really worked when I try to use m$ > w2k's own client...well, that belongs to another forum... I have a question r

Getting the right value >:|

2003-07-02 Thread Dennis Stout
Hi. Whenever I try to get the value of a field in a row from a SQL database, I'm either passed a blank line or the name of the spot in memory in which the information I want resides (like HASHx('80fd23afcc') or something). Earlier in the code, the right use statements as well as $Sql = TTMSSQL->n

Getting the right values :| (continued)

2003-07-02 Thread Dennis Stout
I have another subroutine, sub select_hashref { my $self = shift; my $dbh = $self->{dbh}; my ($select, $from, $where, $other) = @_; my $sql="SELECT $select "; $sql.="FROM $from " if $from; $sql.="WHERE $where " if $where; $sql.="$other" if

Re: Getting the right value >:|

2003-07-02 Thread Dennis Stout
t;[EMAIL PROTECTED]> To: "Dennis Stout" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, July 02, 2003 10 21 Subject: Re: Getting the right value >:| > sub select_decode > { > my $self = shift; > my $dbh = $self->{dbh}; >

Re: Getting the right value >:|

2003-07-02 Thread Dennis Stout
YES. changing return $row->{PWORD}; to $row->{"DECODE(PWORD,'blah')"}; fixed it :D S.T.O.U.T. = Synthetic Technician Optimized for Ultimate Troublshooting - Original Message - From: "Dennis Stout" <[EMAIL PROTECTED]> To: "Kristofer Hoch

select multiple

2003-07-10 Thread Dennis Stout
Beginners-CGI; If I have a form with a lot of values (such as Tech ID, Tech Name, Tech Queues..) and one of the fields is a select multiple, with a varied amount of options selected, how are those values sent to the cgi script? Is it something like ?queue=lvl1,lvl2,admin,sysad&foo=bar or what? T

Re: select multiple

2003-07-10 Thread Dennis Stout
> Because there is no way to create a delimiter that the potential data doesn't contain, the browser doesn't have the option to choose an arbitrary delimiter like a comma, or the like. So (though I can't speak for all browsers most will do the same) each value is passed with the same key, so your

Re: select multiple

2003-07-10 Thread Dennis Stout
aders to work AND now multiple values for one param. S.T.O.U.T. = Synthetic Technician Optimized for Ultimate Troublshooting - Original Message - From: "Chris Faust" <[EMAIL PROTECTED]> To: "Dennis Stout" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; &l

Re: Hiding Params in url

2003-07-10 Thread Dennis Stout
POST versus GET. POST won't pass the value in the url. This doesn't prevent someone from doing a view source and reading the text, but A crypt() on the parameters would be a good idea, then pass the encrypted string around. S.T.O.U.T. = Synthetic Technician Optimized for Ultimate Troublsho

Re: Clearing a Form

2003-07-21 Thread Dennis Stout
> I'm wondering if javascript is the answer? It's going to have to be. Saving those types of things are a function of the browser. Dennis -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Regex question.

2003-07-24 Thread Dennis Stout
> my $date =~ s#(\d{2})(\d{2})(\d{4})#$1/$2/$3#; That amazingly, doesn't have much performance loss to it. I just did: sub build_list_news { my $newstext = ""; my %news = get_news(); foreach (keys %news) { $news{$_}{ctime} =~ s#(\d{4})(\d{2})(\d{2})(\d{2})

Re: How to display multiple web pages depending on

2003-07-28 Thread Dennis Stout
> I want to write a subroutine to select the contain of MySQL database and > display the result on the browser. > But I'm not sure how to get it create multiple pages if the list exceeds > a given number; say 50, and create a link to the next page: like "Next" > or "1 2 3". I think it should be eas

AS/400 and Comsoft systems

2003-07-30 Thread Dennis Stout
Heyuck Heyuck. So I'm told I need to write a simple database to handle ticketing information for customers when they call. Things like DSL problems, dialup problems... nothing major. MySQL database backend with a perl powered web frontend. Then I was told it needs to go htrough a VPN. Cool, no

Eh: AS400 and Comsoft

2003-07-30 Thread Dennis Stout
Somebody is not using a very friendly mailinglist client. It's pretending this is a newsgroup, which is tricking things up... > Sure its possible. Just go to CPAN, install the interfaces to each type of > storage system, and then in your program connect to each data source. You > said you will

RE: AS400 and Comsoft

2003-08-01 Thread Dennis Stout
> > Somebody is not using a very friendly mailinglist client. It's pretending > > this is a newsgroup, which is tricking things up... > > Are you talking about me? I'm the one that replied to your op. > > I have outlook express account that points to nntp.perl.org. There is > software that emails

[OT] Re: disable back button

2003-08-20 Thread Dennis Stout
> I still can use my keyboard... which I mostly use to navigate the web. > > Don't make the life hard on users... they might just leave your site. I made life easier on my users by making the one single popup window I have. It's a ticketing system (written in perl). You click on a ticket number,

Re: disable back button

2003-08-20 Thread Dennis Stout
> BTW. I for once leave web sites of people who try to disable a browsers most used feature. Same! So far, the only practicle and useful thing I've seen done ot modify a users browser is when making a form of some kind, and you make a popup window come up to enter more information or see a quick

Re: [PBML] PLEASE USE [PBML] in your subject line

2003-08-22 Thread Dennis Stout
> hi peep's > I don't post often but what i have found is that alot of you do not put > [PBML] in your subject lines, i get your posting direct to my trash I don't remember reading that in the handbook anywhere, heh. Since when are we supposed to write specific things in the subject? > without i