일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
Tags
- php5
- grid
- solaris network
- perl + 정규표현식
- oracle install
- solaris
- Network
- memory
- SQL
- prompt
- perl one-liner
- cygwin
- rac
- oracle
- Linux
- 오라클
- MySQL
- dba
- Unix
- mariaDB
- bash
- perl string
- Oracle RAC
- patch
- 연산자
- command & perl
- RHEL4
- sqlplus
- fdisk
- PERL
Archives
- Today
- Total
DATA 전문가로 가는 길
[Perl] Perl 자동 화 설정 방법 본문
#!/usr/bin/perl
use strict;
# Include the WWW::Mechanize module
use WWW::Mechanize;
use HTML::Entities; # +
use Encode;
#binmode(STDOUT, ':utf8'); # +
# What URL shall we retrieve?
my $url = "http://cafe.naver.com/joonggonara.cafe?iframe_url=/ArticleSearchList.nhn%3Fsearch.clubid=10050146%26search.searchdate=all%26search.searchtype=1%26search.query=%BE%C6%C0%CC%C6%CC%C5%CD%C4%A13%26search.sortby=date%26search.menuid=337";
# Create a new instance of WWW::Mechanize
my $mechanize = WWW::Mechanize->new(autocheck => 1);
# Retrieve the page
$mechanize->get($url);
# Retrieve the page title
my $title = $mechanize->title;
print "<b>$title</b><br />";
#my $res = $mechanize->submit_form(
# form_name = 'frmSearch',
#);
my $content = encode('cp949',$mechanize->content);
print "$content \n";
# Place all of the links in an array
#my @links = $mechanize->links;
# Loop through and output each link
#foreach my $link (@links) {
#
# # Retrieve the link URL
# my $href = encode('cp949', $link->url);
#
# # Retrieve the link text
# my $name = encode('cp949', $link->text);
# #my $name = $link->text;
#
# print "<a href=\"$href\">$name</a>\n";
#
#}
use strict;
# Include the WWW::Mechanize module
use WWW::Mechanize;
use HTML::Entities; # +
use Encode;
#binmode(STDOUT, ':utf8'); # +
# What URL shall we retrieve?
my $url = "http://cafe.naver.com/joonggonara.cafe?iframe_url=/ArticleSearchList.nhn%3Fsearch.clubid=10050146%26search.searchdate=all%26search.searchtype=1%26search.query=%BE%C6%C0%CC%C6%CC%C5%CD%C4%A13%26search.sortby=date%26search.menuid=337";
# Create a new instance of WWW::Mechanize
my $mechanize = WWW::Mechanize->new(autocheck => 1);
# Retrieve the page
$mechanize->get($url);
# Retrieve the page title
my $title = $mechanize->title;
print "<b>$title</b><br />";
#my $res = $mechanize->submit_form(
# form_name = 'frmSearch',
#);
my $content = encode('cp949',$mechanize->content);
print "$content \n";
# Place all of the links in an array
#my @links = $mechanize->links;
# Loop through and output each link
#foreach my $link (@links) {
#
# # Retrieve the link URL
# my $href = encode('cp949', $link->url);
#
# # Retrieve the link text
# my $name = encode('cp949', $link->text);
# #my $name = $link->text;
#
# print "<a href=\"$href\">$name</a>\n";
#
#}
'Programming > Perl' 카테고리의 다른 글
[ Perl ] Perl Oneliners [Pattern, Select, Change] (0) | 2010.11.30 |
---|---|
[Perl] Perl One-liner 모음 (0) | 2010.02.02 |
[Perl] 문자열 비교 String Diff [ 파일1을 기준으로 파일2에서 중복 값을 출력 ] (4) | 2009.07.04 |
[ Perl ] 텍스트 문자열 파싱 작업(이메일 주소 검출) (0) | 2009.06.16 |
[Perl] Windows XP + Strawberry perl 설치 가이드 (0) | 2009.06.11 |
Comments