source code

2001-12-12 Thread zaka rias

hi 

anyone have simple web browser script (of course with
perl) like lynix ?

thanks



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




Re: source code

2001-12-12 Thread nafiseh saberi

hi.
look at it...
www.summersault.com/software/db_browser/
be successful.

  Best regards. Nafiseh Saberi   
   www.iraninfocenter.net
 www.sorna.net
Friend in need is a friend indeed.
 _
> hi 
> 
> anyone have simple web browser script (of course with
> perl) like lynix ?
> 
> thanks



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




map

2001-12-12 Thread angelo . bettati

Hi to All,
I' d like to know if it' s possible to print the number of occurences of
letter  "o"  inside a variable string,
using perl function map.
This is my code:

use CGI;

$var = "Good morning";
$num = map {"o"} $var;
print qq'

Perl Page
';
print "The number of elements found is: $num";
print qq'';


I' ve changed $var in an array but I've obtained no good results.
Thanks in advance for Your help !!
Bye
Angelo


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




Re: map

2001-12-12 Thread Jonathan E. Paton

> I' d like to know if it' s possible to print the number
> of occurences of letter  "o"  inside a variable string,
> using perl function map.

$qty = $string =~ tr/o/o/;

Shortest and seemingly the fastest solution.

Jonathan Paton



__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

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




problems with gd.pm

2001-12-12 Thread Wagner Garcia Campagner

Hi,

I'm trying to compile a script that is using gd.pm.

But it seems that this library is not installed in my activestate version
(5.6.1.629).

Is there a way for me to use this script with this version of activestate or
use another library?

Thanks in advance,
Wagner


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




Creating a CGI menu

2001-12-12 Thread Gerry Jones

I want to create a menu/navigational section for a website I plan on 
building, and I would like to know if there are any easy-to-use modules I 
could use, or if there's another way. My website will have many levels and I 
don't fancy copying, pasting and tweaking the HTML to get the menu to look 
right on every page. I need someway that will make life easier, that will 
preferably, automatically include new pages.

TIA,

Gerry.

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




Re: Creating a CGI menu

2001-12-12 Thread Brett W. McCoy

On Wed, 12 Dec 2001, Gerry Jones wrote:

> I want to create a menu/navigational section for a website I plan on
> building, and I would like to know if there are any easy-to-use modules I
> could use, or if there's another way. My website will have many levels and I
> don't fancy copying, pasting and tweaking the HTML to get the menu to look
> right on every page. I need someway that will make life easier, that will
> preferably, automatically include new pages.

For raw HTML, you should use SSI, or some kind of templating scheme to
insert the menu into the page.  I've built sub-components with
Text::Template and inserted them into a main page (also using
Text::Template), and it worked out very well.  You can even have dynamic
code in your sub-components.

Beyond templating, you can go with a component-based system like Mason,
which lets you build up web applications using pre-built components.

-- Brett
  http://www.chapelperilous.net/

Too many people are thinking of security instead of opportunity.  They seem
more afraid of life than death.
-- James F. Byrnes


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




Re: Creating a CGI menu

2001-12-12 Thread Francesco Scaglioni

If you look at O'Reilly's cgi programming with perl book there is a
mechanism there which can be modified to do exactly what you want.

The following was adapted from it :

# initialise subject listings one section per subdirectory under
# ../data

 opendir ( DIR, "../data" ) or die "Cannot open subject dir: $!";
while ( defined (  my $subject_dir = readdir  DIR ) ){
  next if   $subject_dir =~  /^\./;   # skip . and ..
  push ( @subjects , $subject_dir );
}
closedir(DIR);

# output list of subjects as links to the script or modify as links
# to pages
sub nav_bar {

print qq[];

foreach  ( @subjects ) {
print < $_ 
HTML
}

print qq[];

}

Hope this helps.

Francesco

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




Re: Creating a CGI menu

2001-12-12 Thread Marty Landman

At 03:05 PM 12/12/01 +, Gerry Jones wrote:
>I want to create a menu/navigational section for a website I plan on
>building, and I would like to know if there are any easy-to-use modules I
>could use, or if there's another way.

I wrote a web basing content management tool to do this called SIMPL which 
allows for a three level website to be created and maintained off a 
site-wide template; all pages rendered on the fly. There's a demo on my 
business site that gives you half an hour to play around with the product 
just like you signed up for the service; it's goes against 2woodstock.com 
which is just a demo site with a basic homepage on it.

The demo's on http://face2interface.com/Home/Demo.shtml and the product 
comes included with my basic hosting plan which you can see at 
http://face2interface.com/Services/Hosting.shtml.

Well, you did ask about other approaches so I hope this isn't considered 
off topic.

Marty

p.s. http://www.thecgibin.com is now developed by me using my product

Website Creation Made SIMPL(tm)
http://face2interface.com/Home/Demo.shtml
WebSafe Color Picker -- http://face2interface.com/Websafe


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




Interesting Chop question.

2001-12-12 Thread Andre` Niel Cameron

Hi,

I have a pain in the butt array that SOMETIMES has a CR at the end and
sometimes does not.  Can anyone think of a way to test to see if the \n is
there and if it is then chop else no chop?  Cause if I just use chop then it
starts chopping off letters sometimes...

Regards,
Andre` C.
Technical Support
ԿԬ

-
Visit our support manual at http://supportmanual.com/


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




Re: Interesting Chop question.

2001-12-12 Thread Brett W. McCoy

On Wed, 12 Dec 2001, Andre` Niel Cameron wrote:

> I have a pain in the butt array that SOMETIMES has a CR at the end and
> sometimes does not.  Can anyone think of a way to test to see if the \n is
> there and if it is then chop else no chop?  Cause if I just use chop then it
> starts chopping off letters sometimes...

Don't use chop, use chomp.  It does exactly what you want -- technically,
it chops off $?, which by default is \n, but doesn't chop it if it's not
there.  You can test the return value of chomp to see how many characters
it removed.

perldoc -f chomp

-- Brett
  http://www.chapelperilous.net/

Some people manage by the book, even though they don't know who wrote the
book or even what book.


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




Re: Interesting Chop question.

2001-12-12 Thread Gerry Jones

On Wednesday 12 December 2001 16:22, Andre` Niel Cameron wrote:
> Hi,
>
> I have a pain in the butt array that SOMETIMES has a CR at the end and
> sometimes does not.  Can anyone think of a way to test to see if the \n is
> there and if it is then chop else no chop?  Cause if I just use chop then
> it starts chopping off letters sometimes...
>
> Regards,
> Andre` C.
> Technical Support
> ԿԬ
> ---
>- -
> Visit our support manual at http://supportmanual.com/

Try chomp.

Gerry.

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




RE: [CGI] Interesting Chop question.

2001-12-12 Thread Hershey, Ernie

Use chomp(), which is just like chop() but will only remove the
character if it's equal to the $/ variable (which is \n by default).

Ernie Hershey

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED]]On Behalf
> Of Andre` Niel Cameron
> Sent: Wednesday, December 12, 2001 11:23 AM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: [CGI] Interesting Chop question.
> 
> 
> Hi,
> 
> I have a pain in the butt array that SOMETIMES has a CR at the end and
> sometimes does not.  Can anyone think of a way to test to see 
> if the \n is
> there and if it is then chop else no chop?  Cause if I just 
> use chop then it
> starts chopping off letters sometimes...
> 
> Regards,
> Andre` C.
> Technical Support
> ԿԬ
> --
> --
> -
> Visit our support manual at http://supportmanual.com/
> 
> -
> The CGI-LIST is sponsored by:
> DINNERBROKER.com!
> Fine dining up to 30% off!
> Exclusive access to tables!
> http://www.dinnerbroker.com/
> 
> This is the cgi-list mailing list:
> To unsubscribe, send email to:
> [EMAIL PROTECTED]
> with the body:
> unsubscribe cgi-list
> 
> No one may in any way attempt to data-mine or archive the
> mailing list for financial gain without the express permission
> of Jann.com.
> 

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




Re: [CGI] Interesting Chop question.

2001-12-12 Thread sherzodR


Ok, if you just want to get rid of a trailing space, use chomp() function
instread of chop(). Coz chop() trims the the last character, and chomp()
trims the record seperator ( $/ ) which is by default a new line that
keeps giving you pain :-)



Andre` Niel Cameron wrote:

ANC: Date: Wed, 12 Dec 2001 11:22:31 -0500
ANC: From: Andre` Niel Cameron <[EMAIL PROTECTED]>
ANC: To: [EMAIL PROTECTED]
ANC: Cc: [EMAIL PROTECTED]
ANC: Subject: [CGI] Interesting Chop question.
ANC:
ANC: Hi,
ANC:
ANC: I have a pain in the butt array that SOMETIMES has a CR at the end and
ANC: sometimes does not.  Can anyone think of a way to test to see if the \n is
ANC: there and if it is then chop else no chop?  Cause if I just use chop then it
ANC: starts chopping off letters sometimes...
ANC:
ANC: Regards,
ANC: Andre` C.
ANC: Technical Support
ANC: ԿԬ
ANC: 
ANC: -
ANC: Visit our support manual at http://supportmanual.com/
ANC:
ANC: -
ANC: The CGI-LIST is sponsored by:
ANC: DINNERBROKER.com!
ANC: Fine dining up to 30% off!
ANC: Exclusive access to tables!
ANC: http://www.dinnerbroker.com/
ANC:
ANC: This is the cgi-list mailing list:
ANC: To unsubscribe, send email to:
ANC: [EMAIL PROTECTED]
ANC: with the body:
ANC: unsubscribe cgi-list
ANC:
ANC: No one may in any way attempt to data-mine or archive the
ANC: mailing list for financial gain without the express permission
ANC: of Jann.com.
ANC:

-- 
Sherzod Ruzmetov <[EMAIL PROTECTED]>
http://www.UltraCgis.com, Consultant
989.774.6265
++
| There is nothing wrong with your tools.|
| But we can make a better one.  |
++


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




Re: [CGI] Interesting Chop question.

2001-12-12 Thread SOARES Philippe

I think using chomp instead of chop should do it... there should be no need for
test.

Philippe Soares

Andre` Niel Cameron a écrit :

> Hi,
>
> I have a pain in the butt array that SOMETIMES has a CR at the end and
> sometimes does not.  Can anyone think of a way to test to see if the \n is
> there and if it is then chop else no chop?  Cause if I just use chop then it
> starts chopping off letters sometimes...
>
> Regards,
> Andre` C.
> Technical Support
> Ô¿Ô¬
> 
> -
> Visit our support manual at http://supportmanual.com/
>
> -
> The CGI-LIST is sponsored by:
> DINNERBROKER.com!
> Fine dining up to 30% off!
> Exclusive access to tables!
> http://www.dinnerbroker.com/
>
> This is the cgi-list mailing list:
> To unsubscribe, send email to:
> [EMAIL PROTECTED]
> with the body:
> unsubscribe cgi-list
>
> No one may in any way attempt to data-mine or archive the
> mailing list for financial gain without the express permission
> of Jann.com.


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




Re: [CGI] Interesting Chop question.

2001-12-12 Thread Jeff 'japhy' Pinyan

On Dec 12, Andre` Niel Cameron said:

>I have a pain in the butt array that SOMETIMES has a CR at the end and
>sometimes does not.  Can anyone think of a way to test to see if the \n is
>there and if it is then chop else no chop?  Cause if I just use chop then it
>starts chopping off letters sometimes...

That's why chomp() exists.

-- 
Jeff "japhy" Pinyan  [EMAIL PROTECTED]  http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
 what does y/// stand for?   why, yansliterate of course.


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




Re: Creating a CGI menu

2001-12-12 Thread Gerry Jones

Thanks for the tips guys.

Francesco: where in the book did you find the code you adapted? I've got the 
book (I had a look before posting), but short of scanning every page, I 
couldn't find it.

Brett:  I now know next to nothing about 
SSI's, which is more than I knew before reading your post. I would prefer to 
use Perl/CGI though.

Marty: shameless plug! ;-) Sorry, only looking for free stuff.

I'm currently looking at "Expanding Menus" by Collin Forbes:
http://kuoi.asui.uidaho.edu/~collinf/scripts.html?mo=exp&key=bf

Any thoughts?

Gerry.

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




Re: [CGI] Interesting Chop question.

2001-12-12 Thread Andre` Niel Cameron

I need to be more carefull what I ask for:)  Thanks for the 13 responses:)
I had acctually never heard of Chomp but I will give it a shot thanx all!

Regards,
Andre` C.
Technical Support
ԿԬ

-
Visit our support manual at http://supportmanual.com/
- Original Message -
From: "Jeff 'japhy' Pinyan" <[EMAIL PROTECTED]>
To: "Andre` Niel Cameron" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, December 12, 2001 11:38 AM
Subject: Re: [CGI] Interesting Chop question.


> On Dec 12, Andre` Niel Cameron said:
>
> >I have a pain in the butt array that SOMETIMES has a CR at the end and
> >sometimes does not.  Can anyone think of a way to test to see if the \n
is
> >there and if it is then chop else no chop?  Cause if I just use chop then
it
> >starts chopping off letters sometimes...
>
> That's why chomp() exists.
>
> --
> Jeff "japhy" Pinyan  [EMAIL PROTECTED]  http://www.pobox.com/~japhy/
> RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
> ** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
>  what does y/// stand for?   why, yansliterate of course.
>
>
> --
> 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: [CGI] Interesting Chop question.

2001-12-12 Thread Darren Duncan

On Wed, 12 Dec 2001, Andre` Niel Cameron wrote:
> I have a pain in the butt array that SOMETIMES has a CR at the end and
> sometimes does not.  Can anyone think of a way to test to see if the \n is
> there and if it is then chop else no chop?  Cause if I just use chop then it
> starts chopping off letters sometimes...

Try using "chomp" instead of "chop".  The "chomp" function was designed to
do exactly what you want - it removes an ending character only if it is
the likes of: newline, linefeed, carrige return, etc.  So that's what I
use all the time.  By contrast, "chop" seems more like a carryover from
older days when things were harder to do. -- Darren Duncan


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




Re: Interesting Chop question.

2001-12-12 Thread Brett W. McCoy

On Wed, 12 Dec 2001, Brett W. McCoy wrote:

> > I have a pain in the butt array that SOMETIMES has a CR at the end and
> > sometimes does not.  Can anyone think of a way to test to see if the \n is
> > there and if it is then chop else no chop?  Cause if I just use chop then it
> > starts chopping off letters sometimes...
>
> Don't use chop, use chomp.  It does exactly what you want -- technically,
> it chops off $?, which by default is \n, but doesn't chop it if it's not
> there.  You can test the return value of chomp to see how many characters
> it removed.

My hand didn't make it off the shift key when I was typing $?.  That
should be $/

-- Brett
  http://www.chapelperilous.net/

A strong conviction that something must be done is the parent of many
bad measures.
-- Daniel Webster


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




Re: Creating a CGI menu

2001-12-12 Thread Curtis Poe

--- Gerry Jones <[EMAIL PROTECTED]> wrote:
> I want to create a menu/navigational section for a website I plan on 
> building, and I would like to know if there are any easy-to-use modules I 
> could use, or if there's another way. My website will have many levels and I 
> don't fancy copying, pasting and tweaking the HTML to get the menu to look 
> right on every page. I need someway that will make life easier, that will 
> preferably, automatically include new pages.
> 
> TIA,
> 
> Gerry.

Gerry,

Due to the number of responses that you have received, I'm sure you realize that there 
are many
ways to do this.  As for myself, I have built some rather large database driven Web 
sites with
Template Toolkit and I find that I like to have the navigation system stored in the 
database as a
node structure.  With one root level node, you can have a table listing all nodes, 
each listing a
parent node and title.  The table would look something like this:

Node Parent Description
 -- ---
11  Home
21  Poets
31  Ex-girlfriends
42  Ovid
52  John Davidson
62  Tennyson
73  Lainie
83  Carrie

This breaks down as (this will show up with a fixed-width font):

   1
/ \
   2   3
 / | \/ \
4  5  6  7   8

In this system, you can see how my favorite poets each fall under the number 2 node, 
while my
ex-girlfriends (this is an abbreviated list, trust me) fall under the 3 node.  Want to 
drill down
from number 2?  Select all nodes who list 2 as a parent.  Want to go back up?  Select 
2's parent. 
Need to find all nodes on a particular level?  Select all nodes with the same parent.

If you want documents in those nodes, create a documents table which contain the node 
ids that
they apply to.  You can either serve your docs out of the database or just have the 
paths in
their.  This system is fairly flexible and easy to control.

Cheers,
Curtis "Ovid" Poe

=
Senior Programmer
Onsite! Technology (http://www.onsitetech.com/)
"Ovid" on http://www.perlmonks.org/

__
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

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




advice required

2001-12-12 Thread Kris G Findlay

hi guys,
the problem i have is this. 

i am running the UK Adhesions Society Website being non profit and with
little funding our present server is capable of
  
* perl/cgi
* ssi
* html/shtml

and we cant afford to upgrade the server at present.

the site is about to evolve from a basic info system to utelising
dynamic news and updates. thus i would like to implement a form of non
technical submision of articles and news.

i planned on doing this by use of forms to create articles etc.. and use
a perl backend to update these pages.

i would like to store the documents in a database format as to move to
mysql at a later date.

to cut a long story short.
i was looking for some advice on implemeting this eg.

best db format to use. - ( both for speed and easy transferel to mysql )

any other comments 

thanks in adavance.

-- 
---
K.G.Findlay
[EMAIL PROTECTED]
Knight Shift (Web/Software Design)
"Your only young once,
 but you can be imature forever"
---


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