data munging with perl - manning 2001
... continues. 3 1 Data, data munging, and Perl What this chapter covers: ■ The process of munging data ■ Sources and sinks of data ■ Forms data takes ■ Perl and why it is perfect for data munging 4 CHAPTER Data, ... Sample data file One data record Data footer Data header One data field 6 CHAPTER Data, data munging, and Perl 1.1.3 Data parsing Having reco...
Ngày tải lên: 25/03/2014, 10:25
... tasks in Perl. So I accepted the challenge and started working, with the goal of providing a book that would sum up the ways to work with graphics from within Perl, and to offer suf- ficient ... for compatibility with exist- ing programs. Figure 5.6 This graph illustrates how to use PGPLOT to plot data points with their respective error bars, a function to fit the data, and...
Ngày tải lên: 25/03/2014, 10:25
... Date: Sat, 20-May-95 03:25:12 GMT Server: NCSA/1.3 MIME-version: 1.0 Content-type: text/html Last-modified: Wednesday, 14-Mar-95 18:15:23 GMT Content-length: 1029 [Entity-body data] In ... example If-Modified-Since header might read: If-Modified-Since: Fri, 02-Jun-95 02:42:43 GMT The same formats accepted for the Date header (listed in Appendix A) are used for the If-Modified-Si...
Ngày tải lên: 17/10/2013, 19:15
Web Client Programming with Perl-Chapter 4: The Socket Library- P1
... $opt_H, $opt_d); } The call to Getopts( ) indicates that we're interested in the -h, -H, -r, and -d command-line options. When Getopts( ) finds these switches, it sets $opt_* (where * is the ... handle to associate with the socket, what the network protocol is, and whether the socket should be stream-oriented or record-oriented. For HTTP transactions, sockets are stream-oriented...
Ngày tải lên: 20/10/2013, 10:15
Web Client Programming with Perl-Chapter 4: The Socket Library- P2
... and entity-body to not echo to STDOUT. This isn't needed anymore in the context of this program. Also, instead of parsing the -r, -H, and -d command-line arguments, we look for -i for displaying ... "usage: $0 -hil URL(s)\n"; print " -h help\n"; print " -i print out image URLs\n"; print " -l print out hyperlink URLs\n"; exit (-1 );...
Ngày tải lên: 20/10/2013, 10:15
Web Client Programming with Perl-Chapter 5: The LWP Library- P1
... entity- body. To define the entity-body, invoke content( ) with a scalar as its first parameter. This method, by the way, is inherited from HTTP::Message. $r->add_content( $data) Appends $data ... $request->header('content-length' => 2); $request->header('content-type' => 'text/plain'); $request->content('hi'); print $reque...
Ngày tải lên: 24/10/2013, 08:15
Web Client Programming with Perl-Chapter 5: The LWP Library- P2
... base URL. $url->crack( ) Returns an array with the following data: (scheme, user, password, host, port, epath, eparams, equery, frag) $url->scheme([$scheme]) When invoked with no parameters, ... deallocate memory used by the tree. Future versions of Perl or LWP may handle this automatically. See online documentation at www .perl. com for up-to-date information. 5. Or a su...
Ngày tải lên: 24/10/2013, 08:15
Web Client Programming with Perl-Chapter 6: Example LWP Programs-P1
... "HELP"; usage: $0 [-hilp] [proxy URL] URLs -h help -i grep out images references only -l grep out hyperlink references only -p use this proxy server Example: $0 -p http://proxy:8080/ ... command-line processing with getopts( ): getopts('hilp:'); my $all = !($opt_i || $opt_l); # $all=1 when -i -l not set if ($opt_h || $#ARGV= =-1 ) { # print help tex...
Ngày tải lên: 28/10/2013, 15:15
Web Client Programming with Perl-Chapter 6: Example LWP Programs-P2
... Tk extension to Perl. Usage: $0 URL\n Options: -l Display local URLs -r Display remote URLs -R Display which HTML pages refers to what -n Display non-HTML links -b Display bad ... (default) -a Display all of the above -v Print out URLs when they are examined -e email Mandatory: Specify email address to include in HTTP request. -m # Examine at most # URLs\n -p ur...
Ngày tải lên: 28/10/2013, 15:15
Web Client Programming with Perl-Chapter 7: Graphical Examples with Perl/Tk- P1
... $scroll->configure(-command => ['yview', $text]); $scroll->pack(-side => 'right', -expand => 'no', - fill => 'y'); $text->pack(-side ... 'lucidasans-bold-18'); $text->tag('configure', '</H3>', -font => 'lucidasans-bold-14'); $text->tag('configure', '<...
Ngày tải lên: 07/11/2013, 09:15