Re: cpan slow ?

2005-01-21 Thread Chris Brown
I was having problems (in Peterborough, UK) but it all seems to be running fine 
again now.

On Friday 21 Jan 2005 09:51, zentara wrote:
> On Thu, 20 Jan 2005 23:18:20 +0530, [EMAIL PROTECTED] (Harsh Busa)
> wrote:
> 
> >hi 
> >
> >i m trying to connect to search.cpan.org (from india ) and getting 502
> >Bad Gateway since almost 2 days ...  anyone else facing the same issue
> >?
> >
> >Harsh 
> 
> Same here from Michigan, USA.  I've been able to get modules from the
> straight listing however, with no delay.
> 
> -- 
> I'm not really a human, but I play one on earth.
> http://zentara.net/japh.html
> 

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




Problems installing Text-Iconv-1.4

2005-01-24 Thread Chris Brown
Hi.
I'm trying to install a local copy of the W3C HTML Validator. I've 
managed to install all the pre-requisites apart from Text-Iconv-1.4 - I 
get the following error message:

/[EMAIL PROTECTED] Text-Iconv-1.4]# perl Makefile.PL
Checking for iconv ... ok (added -liconv)
NOTE: If you have multiple iconv implementations installed, you might
 want to make sure that I've found the one you want to use.
 If necessary, you can explicitly specify paths like this:
 /usr/bin/perl5.8.5 Makefile.PL LIBS='-L/path/to/lib' 
INC='-I/path/to/include'

Checking if your kit is complete...
Looks good
Writing Makefile for Text::Iconv
[EMAIL PROTECTED] Text-Iconv-1.4]# make
cp Iconv.pm blib/lib/Text/Iconv.pm
AutoSplitting blib/lib/Text/Iconv.pm (blib/lib/auto/Text/Iconv)
/usr/bin/perl5.8.5 /usr/lib/perl5/5.8.5/ExtUtils/xsubpp  -typemap 
/usr/lib/perl5/5.8.5/ExtUtils/typemap -typemap typemap  Iconv.xs > 
Iconv.xsc && mv Iconv.xsc Iconv.c
make: *** No rule to make target 
`/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/EXTERN.h', needed by 
`Iconv.o'.  Stop.
[EMAIL PROTECTED] Text-Iconv-1.4]#/

Does anyone know what might be going wrong here? I have installed 
libiconv-1.9.1 and man iconv opens the manual up, so I assume I have got 
iconv installed.

I have tried to change LIBS/INC to reflect my setup but to be honest I'm 
not exactly sure what I should be pointing at here.

Any advice (or suggestions on where I can research this myself) would be 
greatly appreciated.

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



Re: Problems installing Text-Iconv-1.4

2005-01-25 Thread Chris Brown
Many thanks for taking the time to reply, I appreciate that.
Should have mentioned my OS - it's Mandrake Linux 10.1.
I only have one version of Perl installed (at least I have not installed 
another version apart from the one bundled with the OS). This is 
installed at /usr/lib/perl5/

I did a search for the header files, results at the bottom of this mail. 
I may be entirely wrong but should there not be much more than this? I 
found a list in table 25.1 of http://neonatus.net/PERL5/ch25.htm which 
includes many more. For instance, I searched for 'keywords.h' from root 
and did not find any entries.

Am I correct in thinking there are some missing and if so, can you 
suggest an easy way of rectifying this?

Thanks again,
Chris
[EMAIL PROTECTED] perl5]# pwd
/usr/lib/perl5
[EMAIL PROTECTED] perl5]# find -name '*.h'
./5.8.5/i386-linux-thread-multi/CORE/config.h
./5.8.5/i386-linux-thread-multi/CORE/perl.h
./vendor_perl/5.8.5/i386-linux-thread-multi/auto/DBI/DBIXS.h
./vendor_perl/5.8.5/i386-linux-thread-multi/auto/DBI/Driver_xst.h
./vendor_perl/5.8.5/i386-linux-thread-multi/auto/DBI/dbd_xsh.h
./vendor_perl/5.8.5/i386-linux-thread-multi/auto/DBI/dbi_sql.h
./vendor_perl/5.8.5/i386-linux-thread-multi/auto/DBI/dbipport.h
./vendor_perl/5.8.5/i386-linux-thread-multi/auto/DBI/dbivport.h
./vendor_perl/5.8.5/i386-linux-thread-multi/Glib/Install/gperl_marshal.h
./vendor_perl/5.8.5/i386-linux-thread-multi/Glib/Install/gperl.h
./vendor_perl/5.8.5/i386-linux-thread-multi/Gtk2/Install/gtk2perl-autogen.h
./vendor_perl/5.8.5/i386-linux-thread-multi/Gtk2/Install/gtk2perl-versions.h
./vendor_perl/5.8.5/i386-linux-thread-multi/Gtk2/Install/gtk2perl.h
./vendor_perl/5.8.5/i386-linux-thread-multi/Gnome2/Vte/Install/vte2perl-autogen.h
./vendor_perl/5.8.5/i386-linux-thread-multi/Gnome2/Vte/Install/vte2perl-version.h
./vendor_perl/5.8.5/i386-linux-thread-multi/Gnome2/Vte/Install/vte2perl.h
./vendor_perl/5.8.3/i386-linux-thread-multi/Gtk2/TrayIcon/Install/trayicon-autogen.h

[EMAIL PROTECTED] wrote:
- Original Message -
From: Chris Brown <[EMAIL PROTECTED]>
Date: Monday, January 24, 2005 11:44 am
Subject: Problems installing Text-Iconv-1.4
 

Hi.
   

Hi Chriss,
 

I'm trying to install a local copy of the W3C HTML Validator. I've 
managed to install all the pre-requisites apart from Text-Iconv-
1.4 - I 
get the following error message:

/[EMAIL PROTECTED] Text-Iconv-1.4]# perl Makefile.PL
Checking for iconv ... ok (added -liconv)
NOTE: If you have multiple iconv implementations installed, you might
want to make sure that I've found the one you want to use.
If necessary, you can explicitly specify paths like this:
/usr/bin/perl5.8.5 Makefile.PL LIBS='-L/path/to/lib' 
INC='-I/path/to/include'

Checking if your kit is complete...
Looks good
Writing Makefile for Text::Iconv
[EMAIL PROTECTED] Text-Iconv-1.4]# make
cp Iconv.pm blib/lib/Text/Iconv.pm
AutoSplitting blib/lib/Text/Iconv.pm (blib/lib/auto/Text/Iconv)
/usr/bin/perl5.8.5 /usr/lib/perl5/5.8.5/ExtUtils/xsubpp  -typemap 
/usr/lib/perl5/5.8.5/ExtUtils/typemap -typemap typemap  Iconv.xs > 
Iconv.xsc && mv Iconv.xsc Iconv.c
make: *** No rule to make target 
`/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/EXTERN.h', 
needed by 
`Iconv.o'.  Stop.
[EMAIL PROTECTED] Text-Iconv-1.4]#/

Does anyone know what might be going wrong here? I have installed 
libiconv-1.9.1 and man iconv opens the manual up, so I assume I 
have got 
iconv installed.

I have tried to change LIBS/INC to reflect my setup but to be 
honest I'm 
not exactly sure what I should be pointing at here.
   

Yaik's, what OS are you working with ?? Do you have more then one verssion of perl installed ?? Basicly the problem is that, it can't find your Perl Header files. Short solution would be to find where your header files are and create a link to them somewhere in /usr/lib/perl5...
 

Any advice (or suggestions on where I can research this myself) 
would be 
greatly appreciated.
   

let me know if that helps.
mark G
 

Kind regards,
Chris
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>

   


 

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>



Strange problem with cookie script

2005-02-07 Thread Chris Brown
Hi,
I am getting a strange problem with two cookie scripts I've written.
The first, cookie_maker.cgi, creates two cookies containing a user id 
and a security key:

   #!/usr/bin/perl -w
   use strict;
   # creates cookies
   print "Set-Cookie:user=cbfb\n";
   print "Set-Cookie:secid=1234\n";
   # creates html header
   print "Content-type: text/html\n\n";
   print "";
   # prints message
   print "Created a cookie!";
   # prints html footer
   print "";
The second, cookie_reader.cgi, reads the cookies in a browser:
   #!/usr/bin/perl -w
   # creates html header
   print "Content-type: text/html\n\n";
   print "\n";
   # reads cookie data
   if ($ENV{'HTTP_COOKIE'}) {
   @cookies = split (/;/, $ENV{'HTTP_COOKIE'});
   foreach $cookie (@cookies) {
   ($name, $value) = split (/=/, $cookie);
   print "$name=$value\n";
   $crumbs{$name} = $value;
   }
   # found cookies
   print "Found some cookies.\n";
   print "user = $crumbs{'user'}\n";
   print "secid = $crumbs{'secid'}\n";
   # no cookies found
   } else {
   print "No cookies found.\n";
   }
   # creates html footer
   print "\n";
The second script outputs the following (in most browsers, see below):
   user=cbfb
   secid=1234
   Found some cookies.
   user = cbfb
   secid =
For some reason, looking at the page source, a space has been inserted 
before the name of the second cookie, secid, so $crumbs{'secid'} doesn't 
seem to return anything:


user=cbfb
 secid=1234
Found some cookies.
user = cbfb
secid = 

To confuse me even more, if I look at the cookie in Mozilla cookie 
manager, it seems to be fine (ie has no leading space).

It does the same thing in Firefox, Epiphany, Lynx and Galeon. But 
interestingly in Konqueror it is 'user' that has the leading space instead!

BTW, I am using MDK Linux 10.1 with Perl 5.8.5 on Apache.
I am sure I am overlooking something obvious here, but no amount of 
fiddling has sorted it out. Hopefully someone with a better knowledge of 
Perl/CGI can point out what I'm doing wrong? If so, I look forward to 
hearing from you!

Kind regards,
Chris

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



running a script from html

2001-04-22 Thread Chris Brown

i was wondering if anyone could fill me in on how to run a cgi script automaticly when 
an html page is loaded...reason being to show a random image on a page...thanks
chris brown



help me understand $_

2001-04-22 Thread Chris Brown

i have read about it in 3 books and even used it in scripts i have made but i still 
dont truly know how to be sure what $_ contains...can anyone clear this up for me? 
Thanks
Chris Brown



[BPQ] help!! any idea whats wrong with this??

2001-04-24 Thread Chris Brown

so...this is suposed to count the words in FILE and return how many occourances of 
each word there were...its not working for me thoughits only returning the count 
for the last word in the file...help

#!/usr/local/bin/perl

open (FILE,"../www/main.php3");
@lines=;
close(FILE);

foreach $i (@lines) {
@words = split(/\s+/, $i);
}

foreach $word (@words) {
$wordcount{"$word"}=0;
}

foreach $word2 (@words) {
$wordcount{"$word2"}+=1;
}

foreach $key (keys (%wordcount)) {
print "$wordcount{$key} occourances of the whord $key\n";
}




its not homework

2001-04-24 Thread Chris Brown

i have done some cgi stuff like a guestbook and a script to display random images but 
i wanted to get deeper so i thought i would try this...im not in any classes...i guess 
you could call it personal homework...but its not really homework...thanks
Chris Brown



Re: its not homework

2001-04-24 Thread Chris Brown

its no deal man...i got it to work...thanks a ton for the help you guys. Im
sure it wont be long until next time.
Chris Brown




CR LF with UNIX and Windows (DOSish?)

2001-05-14 Thread chris brown

--- David Falck <[EMAIL PROTECTED]> wrote:
>--snip--

I am pretty new at Perl so don't know the syntax to do
this, but could you sidestep the issue and count the
number of bytes in \n, then subtract as appropriate?

Chris

__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/



handling flat-file layouts -- pack or sprintf or something else?

2001-05-24 Thread chris brown

Hello,

Looking for style advice here.

I'm trying to populate records into a flat-file layout
for transfer to a mainframe (offtopic: the FAXed file
layout I received says "prior revision: 11/01/81". 
Sweet!).

Anyway, the layout requires that numerics be
zero-filled to the left, so a 3-byte field containing
the number 7 would show as 007 in the file.  The
layout contains only alphanumerics, nothing fancy.

I would prefer to write each record using pack, but I
can't see how to elegantly get pack to zero-fill
without using sprintf.  And I kind of feel like once
I'm using sprintf I might as well ONLY use sprintf for
the whole record.  And *that* doesn't feel very
Perlish to me, so I suspect there's a different
solution.

Thanks in advance for your thoughts!

Chris


__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/