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 it and i would very much like to read your posting and responses
 but with all the spam rubbish around at the moment this is the best way i

Filter mail based on some other rule like messages that do not contain 'To
unsubscribe, e-mail: [EMAIL PROTECTED]'..

 have found to sort my mail.

I sort by mailing list.

On the server side of thngs, I have SpamAssassin running which catches and
deletes a lot of my mail for me :)

Dennis


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



[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, and
the ticket opens in a popup.  You type in notes, change hte group queue or
private queue ownership or whatever else have you, hit update, and the window
goes away automagically as the ticket gets updated.

 A good example for not screwing with the user is amazon.com.

Earhg =/  And yet somehow I continue to bu from them simply because they're
cheaper than anywhere else around me.  And they offer free shipping.  In
Alaska, thats a huge deal =)

Dennis


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



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 snapshot of something.  Then the
toolbars and things are simply removed, leaving you with an X to click on..
But thats a specialty thing.

My proxy server gets updated every so often to deny access to broken websites
I collect through the week..

Dennis


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



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 list members all of my posts to the news server, and
 this software also takes all emails sent to the list and posts them to the
 news server. So, all of the lists on perl.org are mailing lists AND
 newsgroups.


Interesting.  In that case, someone is using some very odd mailing list
software as it should be mangling things to email out mail messages :)  I have
to hit reply, write my reply, and if I just hit send, an error has occured..
But if I cut the text, cancle the message, create a new one, and paste my
reply...  poof, works :)

 You will be connecting to x data sources, so you will have x objects
 reperesenting each connection. Better? It's your project, not mine.

I need to heavily redo the db portion of my stuff now =P  The OO pm I wrote to
do the database interaction only connects to one database and it reads
variables out of a config file.  I'll have to change it to read a hash out of
a config file and iterate through loops...

   There are already interfaces to the most common SQL databases. Theres
 also a
   perl LDAP interface. You may have to build your own interfaces for the
   Comsoft and AS/400 applications if you must access them with perl. The
 way
   you do this is by creating perl wrappers to the C api that comes with
 your
   data stores.
 
  I don't know how to program in C.  Maybe now is a good time to learn,
 since my
  deadline is hte 22nd of August :)

 So many jokes... so little time ;0)

Aight, out wit the jokes!  I'm not paid enough to beable to purchase
entertainment ...  :P

   I would create a custom object that stores each object as a property.
 This
   will make managing the connection objects easier.
 
  If it were up to me, I would be investing heavily in Vaseline corporation
  because I know exactly where this new ticket system is going to end up

 The mind reels.

Aye.

I got a custom object that stores A dbase object...  but not multiple ones :P
Going to fix that.

Dennis


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



Eh: AS400 and Comsoft

2003-07-31 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 be connecting to 3 data sources, so you will have 3 objects
 representing each connection.

3?  I don't know math very well but..

An existing MySQL server, 2 new SQL servers (unknown exactly what kind of SQL
server, but the core of SQL is simply SQL..), an LDAP server, an Oracle DB,
some Comsoft thing which turns out might be an acient COBOL program, and a 25
year old IBM AS400 system and who knows what kind of db software IBM stuck on
that.  Everyone around me seems to think AS400 _is_ the database.  Bah  I
think anyone with any kind of an administrative password to the thing is
probably retired and dead now.

 There are already interfaces to the most common SQL databases. Theres also a
 perl LDAP interface. You may have to build your own interfaces for the
 Comsoft and AS/400 applications if you must access them with perl. The way
 you do this is by creating perl wrappers to the C api that comes with your
 data stores.

I don't know how to program in C.  Maybe now is a good time to learn, since my
deadline is hte 22nd of August :)

 see: perldoc perlxstut

Reading it as soon as I finsih this email.  Thanks!

 I would create a custom object that stores each object as a property. This
 will make managing the connection objects easier.

If it were up to me, I would be investing heavily in Vaseline corporation
because I know exactly where this new ticket system is going to end up

Dennis


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



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, not my department, I send
them off to SysAdmin to do that.

Now I'm told I have to make it talk to 2 more SQL servers, an Oracle server,
an LDAP server, a Comsoft system, and an AS/400.

Is this possible with Perl or am I needing to find a solution deeper rooted
then a CGI script?

The current simple ticket system runs under mod_perl

Dennis

*SIGH*  need beer.


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



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 easy - but I've never seen codes like
 that before.

The idea is you create a ranged loop.

for (x..x+y) {
  #blah
}

#blah is where you put all your code for retrieving lines from the SQL dbase
and HTMLize them and return them.

x is obtained through CGI params

my $q = new CGI;
my $start = $q-param('start');

x+y is obtained however

1-
my $end = $start + $q-param('amount_per_page');
2-
my $end = $start + 50;

whichever.

Then;

for ($start..$end) {
#grab from db, htmllize, append to scalar variable...
}


print EOF;
center
table
$scalar_from_for_loop
/table
/center
EOF

and, yeah...

Should put you on the right track.  I wrote my own customized interface to SQL
(actually its an interface to the normal DBI interface, heh..) so I didn't
write that portion since what I use would not at all be like what you would
use.

Dennis


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



Re: Regex question.

2003-07-25 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 = table DEFANGED_width='\100%\';
my %news = get_news();
foreach (keys %news) {
$news{$_}{ctime} =~
s#(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})#$1/$2/$3 $4:$5:$6#;
$newstext .= trtd DEFANGED_align='\center\'$news{$_}{ctime} -
b$news{$_}{subject}/b/td
/trtrtd$news{$_}{news}/td/tr;
}
$newstext .= /table;

return $newstext;
}

and I get results at pretty much the same speed I was before I added the
regex.

So, even if there is a performance loss, it's still less then the lagtime
between my workstation and the server it talks to through a 100base hub..
(which is by no means significant)


 i use #'s as delimaters here... some other character may be more appropriate

I found them to be perfect when dealing with date/time stamps.

Dennis


 At 07:49 AM 6/26/2003 -0700, Sara wrote:
 I have a database with the following fields.
 
 lname fnam M
 acct# mrmbirth Postdate  Post#   drln drfn
  m disch

DOE,JOHN,R,00037839842,207337,02151956,04072003,01980,LastName,FirstName,L,04
102003
 
 I have a very simple script which splits the delimiter , and shows the
 result in the same format as in database.
 I want to do following things using regex, but I have tried my options to
 my level best, ::) no results yet,
 
 1- Remove all the leading 000 from any field like acct# = 00037839842
 should be 37939842 and Post# should be 1980
 
 2- Want to format dates like birth = 02151956 should be 02/15/1956
 
 Any help??
 
 Thanks,
 
 Sara.




 -- 
 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: 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 input
type=hidden 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 Troublshooting
- Original Message - 
From: ryan whippo [EMAIL PROTECTED]
To: 'Perl Beginners ' [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, July 10, 2003 10 29
Subject: Hiding Params in url


 I have an application that passes params around in the url.  We need to
 hide these for security reasons.  We also don't want to have to change a
 lot of code.  Any ideas?
 Thanks,
  Ryan



 -- 
 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: Re: dynamic update part of a table

2003-06-30 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:

TMPL_VAR NAME=NEWS

then direct your users to a CGI script of the sort of what I mentioned before.
I'll rewrite it now that I'm not hastly cut  pasting..

#!/usr/bin/perl
use strict;

use HTML::Template;
use DBI;

$dbh = DBI-new(DBI:mysql:news;host=localhost,
  db_username,
  db_password,
  { RaiseErrors = 1, AutoCommit =1}
);

my $sth = $dbh-prepare(SELECT * FROM NEWS WHERE DATE=20032906);
my $news = $sth-execute;

my $template = HTML::Template-new(filename = your_html_file.tmpl);
$template-param(NEWS = $news)
return $template-output();

Users will have to browse to the cgi script of course

Dennis


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



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) ... can u see what my problem is?

I might just be thinking WAY to advanced here too.

Might be a way of doing an Apache config for it.

something like

Location /
  PermanentRedirect localhost/cgi-bin/blah.cgi
/location

Go read up on that, I highly doubt that exact context will work.  And as I
said, I work with Apache 1.3, not 2.0.  They got some more work to do on the
2.0 series yet before I even think about switching...

Dennis


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



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 relevant to this forum.

When will they fix the Apache Request Object in Apache/mod_perl 2.x?

I want my $r god dammit :|

Dennis


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



Re: http_referer question

2003-06-26 Thread Dennis Stout
 should I use $ENV{HTTP_REFERER} to check wether a form was sent from my
 site.
 Because I don't want people to download my webpage, put a link to a form,
 and modify some of the forms so it can crash the script.(eventough i tried
 to protect from that).


Enough error handling in your script will keep it from crashing.

And if the script does crash, it's not you who suffers, it's hte idiot who's
trying to link a form to it when all their users get an error 500 :)

You could try using the script to generate the HTML and set a cookie on the
clients machine, 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 unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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=param('input');

 both put the contents of 'input' into $input and the last one has less
 lines and less opportunity for typos, but the first is better practice
 than the second. Gently, please; why?

Okay, I'll expand on it a little.

So when you leave and someone else takes over, they can maintain it and have a
clue.  :)

For instance, go here:  www.stout.dyndns.org/~stout/ttms.tar.gz (2.8KB). You
tell me how readable it is now and realize I'm using the good programming
techniques, and tell me if it would even be close to readable if I weren't.

Dennis



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



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 match it regardless of case?
 
 $a2 = 'Lambott';
 $a3 = 'laMboTt';
 lc($a2);
 lc($a3);
 
 # Now $a2 eq $a3 because both of
 # their values are lower-cased to 'lambott'.

I'd just modify your first case.

instead of

if ($a3 =~ /$a2/) {

I'd say

if ($a3 =~ /$a2/i) {


They both work.  Just tossing out new ideas for folks to play with :)

Dennis

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



Re: question about perl.

2003-03-27 Thread Dennis Stout
If you are going to not even return to the program, exec.

if (condition == true) {
   exec program;
} else {
   exec otherprogram;
}

If you want to return to it but not do anything with the programs output,
system.

if (condition == true) {
   system program;
} 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 [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 27, 2003 10 07
Subject: question about perl.


How do I run another perl program from within another perl program?

if (x=0)
{
perl_ program_ 1.pl
}
else
{
perl_program_2
}
exit;


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



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 Stout
S.T.O.U.T. = Synthetic Technician Optimized for Ultimate Troublshooting

- Original Message -
From: Dennis Stout [EMAIL PROTECTED]
To: Luinrandir Hernsen [EMAIL PROTECTED]
Sent: Thursday, March 27, 2003 13 19
Subject: Re: question about perl.


 You're missing a } on the else line.

 $input = $ENV{QUERY_STRING};
 if ($input) {
 The program...
 } else {
 . w00t
 exec game-log.pl;
 }

 :)

 Dennis Stout
 S.T.O.U.T. = Synthetic Technician Optimized for Ultimate Troublshooting

 - Original Message -
 From: Luinrandir Hernsen [EMAIL PROTECTED]
 To: Dennis Stout [EMAIL PROTECTED]
 Sent: Thursday, March 27, 2003 13 12
 Subject: Re: question about perl.


  $input = $ENV{QUERY_STRING};
  if ($input) {
  The program
  else {
  so you have to start at the log on screen
  exec game-log.pl;
  }
 
  The two perl programs are in the same cgi/game/ directory
  but it doesnt work.
  I even looked in the Visual Perl book and it should work..
  any thoughts?
  Thanks in advance
  Lou
 
 
 
  - Original Message -
  From: Dennis Stout [EMAIL PROTECTED]
  To: Luinrandir Hernsen [EMAIL PROTECTED];
  [EMAIL PROTECTED]
  Sent: Thursday, March 27, 2003 2:19 PM
  Subject: Re: question about perl.
 
 
   If you are going to not even return to the program, exec.
  
   if (condition == true) {
  exec program;
   } else {
  exec otherprogram;
   }
  
   If you want to return to it but not do anything with the programs
output,
   system.
  
   if (condition == true) {
  system program;
   } 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 [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Thursday, March 27, 2003 10 07
   Subject: question about perl.
  
  
   How do I run another perl program from within another perl program?
  
   if (x=0)
   {
   perl_ program_ 1.pl
   }
   else
   {
   perl_program_2
   }
   exit;
  
  
   --
   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]



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]
Sent: Thursday, March 27, 2003 13 36
Subject: Re: question about perl.


 I'm having a really good day apearently ...

 You is Luinrandir Hernsen.  Bah

 Anyone up for a beer  :P

 Dennis Stout
 S.T.O.U.T. = Synthetic Technician Optimized for Ultimate Troublshooting

 - Original Message -
 From: Dennis Stout [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, March 27, 2003 13 32
 Subject: Fw: question about perl.


  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 Stout
  S.T.O.U.T. = Synthetic Technician Optimized for Ultimate Troublshooting
 
  - Original Message -
  From: Dennis Stout [EMAIL PROTECTED]
  To: Luinrandir Hernsen [EMAIL PROTECTED]
  Sent: Thursday, March 27, 2003 13 19
  Subject: Re: question about perl.
 
 
   You're missing a } on the else line.
  
   $input = $ENV{QUERY_STRING};
   if ($input) {
   The program...
   } else {
   . w00t
   exec game-log.pl;
   }
  
   :)
  
   Dennis Stout
   S.T.O.U.T. = Synthetic Technician Optimized for Ultimate Troublshooting
  
   - Original Message -
   From: Luinrandir Hernsen [EMAIL PROTECTED]
   To: Dennis Stout [EMAIL PROTECTED]
   Sent: Thursday, March 27, 2003 13 12
   Subject: Re: question about perl.
  
  
$input = $ENV{QUERY_STRING};
if ($input) {
The program
else {
so you have to start at the log on screen
exec game-log.pl;
}
   
The two perl programs are in the same cgi/game/ directory
but it doesnt work.
I even looked in the Visual Perl book and it should work..
any thoughts?
Thanks in advance
Lou
   
   
   
- Original Message -
From: Dennis Stout [EMAIL PROTECTED]
To: Luinrandir Hernsen [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Thursday, March 27, 2003 2:19 PM
Subject: Re: question about perl.
   
   
 If you are going to not even return to the program, exec.

 if (condition == true) {
exec program;
 } else {
exec otherprogram;
 }

 If you want to return to it but not do anything with the programs
  output,
 system.

 if (condition == true) {
system program;
 } 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 [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, March 27, 2003 10 07
 Subject: question about perl.


 How do I run another perl program from within another perl program?

 if (x=0)
 {
 perl_ program_ 1.pl
 }
 else
 {
 perl_program_2
 }
 exit;


 --
 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]



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 searching for a string of consecutive words say the lucky
 coin
 These may be in one line or different line separated by blank
 lines such as

 1the

 lucky coin
 2thelucky
 coin

 3the

 lucky coin

 Whats the way in perl ?

 mark

 ___
 Odomos - the only  mosquito protection outside 4 walls -
 Click here to know more!

http://r.rediff.com/r?http://clients.rediff.com/odomos/Odomos.htmodomoswn


 --
 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: 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.
It should also sit on the bookshelf of any Perl programmer, regardless of
whether they use it to read from cover to cover, or to lookup those
miscelanious little tid bits they kind of know and need clarification on.

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]
Sent: Friday, March 14, 2003 11 47
Subject: CGI::FormBuilder


 Is there a way to print a 'button' input type without a label next to it
 using the FormBuilder object?  I can't find the right combination.
 
 I always wind up with this
 
  +---+
 Next |Next   |
  +---+
 
 and what I want is
 
  +---+
  |Next   |
  +---+
 
 $form-field(name = 'next', value = 'Next', label = 0)
 is all I could think of to try but that doesn't work.
 
 -- 
 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: 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: NULL insertion

2003-02-24 Thread Dennis Stout
 I need to insert NULL into the database using a perl CGI . So if a variable
 is to be made NULL in perl and it needs to be used in an sql statement what
 is best way to do it. Do I assign ' \N' to it or 'NULL' ?

Standard SQL syntax for presenting null is SET VARIABLE=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: How can I send Variables ?

2003-02-20 Thread Dennis Stout
 www.mysite.com/index.cgi?id=$varname=$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 do proper taint checking and continue on with whatever it is you need
with those values :)

Dennis


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




Re: Search for a string

2003-02-04 Thread Dennis Stout
Sheesh.

Wil ya'll just help a man with a perl problem instead of battering him with
other ways to do it?

Sometimes people like ot pose a challenge to themselves and see if it can be
done.

Instead of being counterproductive and refering peopel to other things, help
the man!

I wish I could 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 want to strip it apart
 into the separate pieces, pipe that piece to Analog and dump the results
 into the vhost folder for the site owner to view.

 I don't want to have to collect and run through 40 individual files, I want
 to have the system do the work creating temporary vhost log files and
 processing them.

 That mod to my shell script is kind of what I am looking for. I guess I
 wasn't sure if I could do that with Perl as well.
 ---
 Jeremy SchwartzStarmark
 Interactive Developer
 [EMAIL PROTECTED]954-761-1600

  From: [EMAIL PROTECTED]
  Date: Mon, 3 Feb 2003 12:32:05 -0600
  To: Jeremy Schwartz [EMAIL PROTECTED], Andy Lester
[EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED], [EMAIL PROTECTED]
  Subject: Re: Search for a string
 
 
  
  On Mon, 03 Feb 2003 13:09:47 -0500, Jeremy Schwartz [EMAIL PROTECTED]
  wrote:
 
  Not trying to reinvent the wheel.
 
  I am using Analog for the analysis.
 
  I am trying to split the server combined log into individual vhost logs.
I
  can then run each through Analog to produce individual reports.
 
  Don't reinvent the wheel.  There are a number of fine log analysis
  utilities, such as analog.
 
  xoa
 
  Out of curiousity is there a reason why you are not handling this at the
  Apache level?  Each vhost can have its own set of logs at the start that
then
  would not need to be pulled apart.  Is this a possible scenario for you
going
  forward? (granted it doesn't help now).  It would seem that your task
would be
  better handled with shell script possibly since you already have the
command
  line for creating the file(s) from the main log, so then just wrap that
  command in a foreach that takes your directory names as input.
 
  Something along the lines of:
 
  #!/bin/sh
 
  for dir in `ls -1 /webroot/`; do
  cat /var/log/httpd/access_log | grep $dir 
  /var/log/httpd/access_log_$dir
  done
 
  I am no shell hacker and the above is untested, but you get the idea.  In
  general Perl would not be a good choice for performing something so simple
  that already has a command line solution available.
 
  If you were going to do it in Perl, rather than looking for each vhost in
the
  log file, you would be better off unpacking or splitting, etc. the log
line
  and storing that line to an array that is associated with the particular
vhost
  in the log line and then printing each vhost's array to a file, or you
would
  have to open a filehandle for each vhost at the beginning of the script
and
  then just print the line to whichever filehandle is associated with a
  particular vhost.  Stepping through every line of the log file foreach of
the
  vhosts in Perl would probably be a really bad way to handle things.
 
  I would still suggest letting Apache do the splitting by not storing one
main
  log with all vhost content, it is much easier to put the logs back
together to
  get a complete picture than it is to disect them after the fact.
 
  http://danconia.org
 
  --
  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]




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:
 
 I'm parsing info in from a form:
 
 $day2 = $field{'x_Day2'} ;
 $day3 = $field{'x_Day3'} ;
 $day4 = $field{'x_Day4'} ;
 
 and let's say that the form element for x_Day3 was left blank when
 submitted.
 
 Now, I make an array:
 
 @days=($day2,$day3,$day4);
 
 I'd like to be able to print the elements of the array that contain
 information ($day2,$day4) without printing out a new line for $day3.  I've
 looked at the join and foreach statements, but thus far I've only been able
 to print each element of the array, whether it's got an assigned value or
 not.  Hence, the results of my current script look something like this:
 
 Tuesday
 
 Thurdsay
 
 when I'd really like to leave the blank line out between Tuesday and
 Thursday.
 
 Is it possible for me to accomplish this using an array the way I have (or
 want to)?
 
 Thanks for any help you can provide.
 
 Jan Cohen
 
 
 -- 
 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]