Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: rubis
  • Content: Threads
  • Order by date
  1. rubis

    Value of array in a package

    Hi all, I have my own package which has one array as a global variable. In my main pgm, I use a &quot;for&quot; loop to create objects. package.pm our @array; sub new { my ($self, $a); push (@array, $a); } main.pl for ($i=0; $i<=3; $i++) { $x[$i] = package->new($i); } print @x...
  2. rubis

    Search for one element in an array

    Hi all, Is there any function/a method to check if a particular value is in an array apart from using &quot;foreach&quot; to check it one by one?? Thanks,
  3. rubis

    Share &quot;constant&quot; among many modules

    I had this problem before so it might be useful for someone package Global; use strict; require Exporter; use vars qw(@ISA @EXPORT); @ISA = qw(Exporter); @EXPORT = qw(A B); use constant A => &quot;A&quot;; use constant B => &quot;B&quot;; 1; within the caller one use...
  4. rubis

    How to share &quot;constant&quot; among many modules

    Hi, I want to share the same constants among 3 modules e.g. Module A, B and C use the same constant $x. Could u pls suggest me how to do it? Thanks,
  5. rubis

    HTML::Filter problem

    Hi, I've got this code from an example in PerlDoc. It's a package to test HTML::Filter. From the manual, it says this package will count table tags and then make output not happen when inside a table. package TableStripper; require HTML::Filter; @ISA = qw(HTML::Filter); sub start { my...
  6. rubis

    Extract the header of a Web site

    Hi, I would like to extract the information of the header from a Web page. I've found an example as the following. use LWP::Simple qw($ua get); use HTTP::Headers; use HTML::HeadParser; $ua->proxy(http => &quot;http://www.proxy.com/&quot;); $h = HTTP::Headers->new; $p =...
  7. rubis

    How to use Access on LAN

    Hi, I would like to create a database and use it on LAN with 10 users accessing it. I prefer to write an EXE program in VB coz I don't want to install Access on every user machines. My requirement is each user can access to different part of the DB e.g. some can add data into tables and some...
  8. rubis

    regexp to search in &quot;http://www.server.com&quot;

    I have an input that could be http://www.svr.com/ or http://www.svr.com/file.ext if the input if &quot;http://www.svr.com/file.ext&quot;, I want to eliminate file.ext and get &quot;http://www.svr.com/&quot;. I've tried $url =~ m[^http://+?/+?\.*?] but it doesn't work. Any suggestion??
  9. rubis

    LWP module and Agent

    I want to set the agent but I don't know what I should put for AgentName. $ua->agent(&quot;AgentName/0.1 &quot; . $ua->agent); For example, if I want my Agent to be IE, what should I put? Also, what does &quot;.$ua->agent&quot; mean? As when I put $ua->agent(&quot;IE/6.0&quot;); I think IE...
  10. rubis

    Force a proxy to reload a page every time using LWP::UserAgent

    The information comes partly from rfc2068 and then how that is implemented in LWP::UserAgent (using HTTP::Headers) to modify the request header. In compliance with HTTP 1.0 the request needs to send a 'Pragma: no-cache' in the request header. With HTTP 1.1 the preferred method is to include a...
  11. rubis

    Save HTML files back

    I want to save HTML files of Web pages back to the local machine. First of all, I wrote this code use LWP::UserAgent; use HTTP::Request; use HTTP::Response; $ua = LWP::UserAgent->new; $res = HTTP::Resquest->new('GET', &quot;http://server.name&quot;;); $rep = $ua->request($res); This code...
  12. rubis

    Save HTML files back

    I want to save HTML files of Web pages back to the local machine. First of all, I wrote this code use LWP::UserAgent; use HTTP::Request; use HTTP::Response; $ua = LWP::UserAgent->new; $res = HTTP::Resquest->new('GET', &quot;http://server.name&quot;); $rep = $ua->request($res); This code...
  13. rubis

    Can't save a remote file back to a local server

    I want to save a HTML file from a Web site. I've 2 questions about it 1. I use LWP::Simple as below $url = &quot;http://server.com&quot;; $file = &quot;/path/test.html&quot;; $response = getstore($url, $file); I have already changed mode of path to 777 (this path is outside my web directory)...
  14. rubis

    &quot;501 (Not Implemented) Protocol scheme 'http' is not supported&quot; Error

    I want to write a perl code to save back HTML files of Web sites in order to analyse them. I first test by using the following code $ua = LWP::UserAgent->new; $req = HTTP::Request->new('GET',&quot;http://www.yahoo.com&quot;); $res = $ua->request($req); if ($res->is_error) { print...
  15. rubis

    How to debug CGI program

    I have got &quot;500-Internal Server Error&quot; but I don't know what the error is. So I'm wondering how to debug it. Well, I cannot run &quot;perl code.cgi&quot; coz of the configuration of the server I'm using. I have to run it through CGI only.
  16. rubis

    How to debug the CGI program

    I have got &quot;500-Internal Server Error&quot; but I don't know what the error is. So I'm wondering how to debug it. Well, I cannot run &quot;perl code.cgi&quot; coz of the configuration of the server I'm using. I have to run it through CGI only.
  17. rubis

    Looking for good books about CGI

    Hi, I would like to study how to CGI by using Perl. Do you have any recommend books/suggestion? Thanks
  18. rubis

    install libwww module

    Hi all, I'm trying to install this module. I've already installed all recommend pacakges (HTML::Parser, URI, MIME-Base64, libnet, Digest-MD5). Once I type &quot;perl Makefile.PL&quot;, there's nothing happened even I've been waiting for more than 20 mins. When I debug it, the program stuck at...
  19. rubis

    Anybody use Konverse on Debian

    I'm using Konverse on Debian but once I installed it. There is an icon of a green question mark on my task bar. I think it's supposed to be a yellow lamp one. I used &quot;apt-get install konverse&quot; to install. Any suggestion to change it to the lamp picture coz now I can't see any status...
  20. rubis

    How to know that LWP::Simple have been installed

    Hi all, At the first place, I used the following code to check if LWP::Simple has been installed eval &quot;use LWP::Simple&quot;; if ($@) { print &quot;LWP installed\n&quot;; } else { print &quot;LWP not installed\n&quot;; } Once I runned this code, it said &quot;LWP installed&quot...

Part and Inventory Search

Back
Top