Sponsored Content
Full Discussion: LWP module ?
Top Forums UNIX for Dummies Questions & Answers LWP module ? Post 3847 by mib on Thursday 12th of July 2001 07:45:55 AM
Old 07-12-2001
Telnet to server and run the code. If u want to execute it is through browser you have to make some changes:

#!/usr/bin/perl

print "Content-type: text/html\n\n";

use File::Find;

foreach $start (@INC) { find(\&modules, $start); }


sub modules {
if (-d && /^[a-z]/) { $File::Find::Prune = 1; return; }
return unless /\.pm$/;
my $filename = "$File::Find::dir/$_";
$filename =~ s!^$start/!!;
$filename =~ s!\.pm$!!;
$filename =~ s!/!::!g;
print "$filename<BR>\n";
}

 

10 More Discussions You Might Find Interesting

1. Solaris

decipher pstack with problem lwp

My company has a product that is running on JBoss on Solaris against Oracle 8.1.7. We are having an issue with the server process and high CPU utilization. During this time, and only during this time, we are experiencing database locks that will not let go. A 'ps -L' on the server process... (5 Replies)
Discussion started by: hosierdm
5 Replies

2. Shell Programming and Scripting

Help needed in Perl LWP module

Hi, I've a issue in writing a perl script that will automatically monitor the site availability. There are two different cookies are set in two consecutive flows to a URL and this second cookie has to be passed to the third step which actually gives permission to access based upon the cookie. ... (1 Reply)
Discussion started by: dayanandra
1 Replies

3. Linux

How to convert Linux Kernel built-in module into a loadable module

Hi all, I am working on USB data monitoring on Fedora Core 9. Kernel 2.6.25 has a built-in module (the one that isn't loadable, but compiles and links statically with the kernel during compilation) to snoop USB data. It is in <kernel_source_code>/drivers/usb/mon/. I need to know if I can... (0 Replies)
Discussion started by: anitemp
0 Replies

4. Shell Programming and Scripting

Login using perl LWP module

Hi, Could some one tell me how to login to any web site and get that page using perl LWP. I heard that we can login to the site using LWP. I dont want to use WWW:Mechanize as I dont have that module installed on the server. Appreciate your early response. Thanks... (8 Replies)
Discussion started by: Anjan1
8 Replies

5. Shell Programming and Scripting

authentication using LWP

Can some one tell me how to post the username and password using perl LWP. An example is sufficient.. (0 Replies)
Discussion started by: Anjan1
0 Replies

6. UNIX for Dummies Questions & Answers

LWP::Simple Problem !!

Hi All, I'm having a problem when I run the following code for example perl -e 'use LWP::Simple; getprint "http://google.com"' Can't locate LWP/Simple.pm in @INC (@INC contains: /System/Library/Perl/5.8.6/darwin-thread-multi-2level /System/Library/Perl/5.8.6... (7 Replies)
Discussion started by: pawannoel
7 Replies

7. Shell Programming and Scripting

Perl LWP user authentication

Hello all.. i am new to perl scripting.. i wanted to parse a text file, encode the parsed text and attach in url.. please point me to right resources if you know any..This is my major problem. Now i try to get a url running and save it in a text file using LWP module in perl, I used following... (0 Replies)
Discussion started by: empyrean
0 Replies

8. Shell Programming and Scripting

lwp-request examples

Hi; Can i have ne sample examples of of using " lwp-request" in shell script. Is it necessary to have perl installed already in linux box for using this; Thnks; (2 Replies)
Discussion started by: ajaypadvi
2 Replies

9. Shell Programming and Scripting

parsing a webpage - perl lwp

I am requesting for the text parsing section below. Any helps are highly appreciated. <tr valign="top"><td nowrap>Source name</td> <td style="text-align: justify">Sample Name<br></td> I want Sample Name from above. In the same file, I have to search for another pattern like this <td><a... (1 Reply)
Discussion started by: jacobs.smith
1 Replies

10. Web Development

Using LWP without hard coding password

Hi, I would like to read content from a https site. I have decided to use LWP module in perl. but it throwed 401 Authorization required error. i dont want to hard code the password in my perl code. Is there any way to achieve the authentication without hardcoding the password. Thanks,... (1 Reply)
Discussion started by: pandeesh
1 Replies
PerlReq::Utils(3pm)					User Contributed Perl Documentation				       PerlReq::Utils(3pm)

NAME
PerlReq::Utils - auxiliary routines for B::PerlReq, perl.req and perl.prov DESCRIPTION
This module provides the following convenience functions: path2mod Convert file path to module name, e.g. File/Find.pm -> File::Find. mod2path Convert module name to file path, e.g. File::Find -> File/Find.pm. path2dep Convert file path to conventional dependency name, e.g. File/Find.pm -> perl(File/Find.pm). Note that this differs from RedHat conventional form perl(File::Find). mod2dep Convert module name to conventional dependency name, e.g. File::Find -> perl(File/Find.pm). Note that this differs from RedHat conventional form perl(File::Find). verf Format module version number, e.g. 2.12 -> 2.120. Currently truncated to 3 digits after decimal point, except for all zeroes, e.g. 2.000 -> 2.0. Update. The algorithm has been amended in almost compatible way so that versions do not lose precision when truncated. Now we allow one more .ddd series at the end, but .000 is still truncated by default, e.g. 2.123 -> 2.123, 2.123456 -> 2.123.456. verf_perl Format Perl version number, e.g. 5.005_03 -> 1:5.5.30. sv_version Extract version number from B::SV object. v-strings converted to floats according to Perl rules, e.g. 1.2.3 -> 1.002003. argv Obtain a list of files passed on the command line. When command line is empty, obtain a list of files from standard input, one file per line. Die when file list is empty. Check that each file exists, or die otherwise. Canonicalize each filename with "File::Spec::rel2abs()" function (which makes no checks against the filesystem). inc Obtain a list of Perl library paths from @INC variable, except for current directory. The RPM_PERL_LIB_PATH environment variable, if set, is treated as a list of paths, seprarated by colons; put these paths in front of the list. Canonicalize each path in the list. Finally, the RPM_BUILD_ROOT environment variable, if set, is treated as installation root directory; each element of the list is then prefixed with canonicalized RPM_BUILD_ROOT path and new values are put in front of the list. After all, only existent directories are returned. explode Split given filename into its prefix (which is a valid Perl library path, according to the inc() function above) and basename. Return empty list if filename does not match any prefix. AUTHOR
Written by Alexey Tourbin <at@altlinux.org>. COPYING
Copyright (c) 2004 Alexey Tourbin, ALT Linux Team. This is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. SEE ALSO
B::PerlReq, perl.req, perl.prov perl v5.14.2 2011-11-05 PerlReq::Utils(3pm)
All times are GMT -4. The time now is 10:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy