Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 72 lines (43 sloc) 1.677 kB
65c8242 @petdance We need to parse XML.
authored
1 =head1 How do I...
d5f3b1b @petdance Importing from Andy original repo
authored
2
3 =head2 How do I get data from a database?
4
5 DBI, and its DBD children, like DBD::SQLite
6
7 =head2 How do I get data from a web page?
8
9 LWP stands for "libwww-perl", and is the standard way of talking
10 to web pages.
11
12 WWW::Mechanize is a superset of LWP that makes HTML processing
13 easier.
14
15 =head2 How do I do date calculations?
16
17 Use C<Date::Manip>, C<Date::Calc> or C<DateTime>. All have different
18 styles and different capabilities.
19
20 =head2 How do I handle command-line arguments in my program?
21
22 Use C<Getopt::Long>.
23
24 =head2 How do I write CGI programs?
25
26 Use C<CGI>.
27
28 =head2 How do I parse HTML?
29
30 Whatever you do, don't use regular expressions. Use C<HTML::Parser>
31 or one of the many classes that uses it. Look around on
32 L<http://search.cpan.org>.
33
34 If you're parsing HTML so that you can extract links or images from
35 a web page, use C<WWW::Mechanize> which handles it for you.
36
65c8242 @petdance We need to parse XML.
authored
37 =head2 How do I parse XML?
38
b3117f7 @petdance Adding link for recommended XML modules
authored
39 See the list of Recommended XML Modules at the Perl 5 wiki.
40
41 L<http://www.perlfoundation.org/perl5/index.cgi?recommended_xml_modules>
42
0e82ec8 @petdance Add stuff about slices
authored
43 =head2 How do I know if a URL is valid?
65c8242 @petdance We need to parse XML.
authored
44
0e82ec8 @petdance Add stuff about slices
authored
45 =head2 How do I do screen access?
46
47 =head2 How do I do colors?
48
d56ffb2 @petdance how to do a password
authored
49 Use Term::ANSIColor. Example wanted.
0e82ec8 @petdance Add stuff about slices
authored
50
d56ffb2 @petdance how to do a password
authored
51 =head2 How do I do readkey? How do I enter passwords without seeing them entered?
52
53 Use Term::ReadKey (L<http://search.cpan.org/dist/TermReadKey>).
54 It's a standard core module.
55
56 use Term::ReadKey;
57
58 ReadMode('noecho');
59 my $passwd;
60 my $pwcheck;
61
62 print 'password: ';
63 chomp($passwd = <STDIN>);
64 print "\n";
65
66 print 'verify: ';
67 chomp($pwcheck = <STDIN>);
68 print "\n";
69 ReadMode('normal');
70
71 print "You entered [$passwd] and [$pwcheck]\n";
Something went wrong with that request. Please try again.