{"id":329,"date":"2015-09-14T06:30:36","date_gmt":"2015-09-14T06:30:36","guid":{"rendered":"http:\/\/onlinelab.info\/?p=329"},"modified":"2015-09-14T06:30:36","modified_gmt":"2015-09-14T06:30:36","slug":"perl-bai-1-lam-quen-voi-perl","status":"publish","type":"post","link":"https:\/\/www.asianux.org.vn\/index.php\/2015\/09\/14\/perl-bai-1-lam-quen-voi-perl\/","title":{"rendered":"Perl: B\u00e0i 1 &#8211; l\u00e0m quen v\u1edbi Perl"},"content":{"rendered":"<ol>\n<li>Gi\u1edbi thi\u1ec7u:<\/li>\n<\/ol>\n<p>Perl vi\u1ebft t\u1eaft c\u1ee7a t\u1eeb Partical Extration and Report Language t\u1ea1m hi\u1ec3u l\u00e0 ng\u00f4n ng\u1eef k\u1ebft xu\u1ea5t v\u00e0 b\u00e1o c\u00e1o th\u1ef1c d\u1ee5ng. Perl \u0111\u01b0\u1ee3c Larry Wall x\u00e2y d\u1ef1ng t\u1eeb n\u0103m 1987. M\u1ee5c \u0111\u00edch ch\u00ednh c\u1ee7a n\u00f3 l\u00e0 t\u1ea1o ra m\u1ed9t ng\u00f4n ng\u1eef l\u1eadp tr\u00ecnh c\u00f3 kh\u1ea3 n\u0103ng ch\u1eaft m\u1ed9t l\u01b0\u1ee3ng d\u1eef li\u1ec7u v\u00e0 cho ph\u00e9p x\u1eed l\u00fd d\u1eef li\u1ec7u nh\u1eb1m thu \u0111\u01b0\u1ee3c k\u1ebft qu\u1ea3 c\u1ea7n t\u00ecm.<\/p>\n<p>Perl l\u00e0 m\u1ed9t ng\u00f4n ng\u1eef th\u00f4ng d\u1ee5ng trong l\u0129nh v\u1ef1c qu\u1ea3n tr\u1ecb h\u1ec7 th\u1ed1ng v\u00e0 x\u1eed l\u00fd c\u00e1c trang web do c\u00f3 c\u00e1c \u01b0u \u0111i\u1ec3m sau:<\/p>\n<p>+ C\u00f3 c\u00e1c thao t\u00e1c qu\u1ea3n l\u00fd t\u1eadp tin, x\u1eed l\u00fd th\u00f4ng tin thu\u1eadn ti\u1ec7n.<\/p>\n<p>+ Thao t\u00e1c v\u1edbi c\u00e1c chu\u1ed7i k\u00fd t\u1ef1 r\u1ea5t t\u1ed1t.<\/p>\n<p>+ \u0110\u00e3 c\u00f3 m\u1ed9t th\u01b0 vi\u1ec7n m\u00e3 l\u1ec7nh l\u1edbn do c\u1ed9ng \u0111\u1ed3ng s\u1eed d\u1ee5ng Perl \u0111\u00f3ng g\u00f3p (CPAN).<\/p>\n<p>C\u00fa ph\u00e1p c\u1ee7a Perl kh\u00e1 gi\u1ed1ng v\u1edbi C, t\u1eeb c\u00e1c k\u00fd t\u1ef1 \u0111\u1ebfn t\u00ean h\u00e0m, do \u0111\u00f3, nhi\u1ec1u ng\u01b0\u1eddi \u0111\u00e3 c\u00f3 kinh nghi\u1ec7m v\u1edbi C th\u1ea5y Perl d\u1ec5 h\u1ecdc. Perl kh\u00e1 linh ho\u1ea1t v\u00e0 cho ph\u00e9p ng\u01b0\u1eddi s\u1eed d\u1ee5ng gi\u1ea3i quy\u1ebft c\u00f9ng m\u1ed9t s\u1ed1 v\u1ea5n \u0111\u1ec1 \u0111\u01b0\u1ee3c \u0111\u1eb7t ra theo nhi\u1ec1u c\u00e1ch kh\u00e1c nhau.<\/p>\n<p>2. C\u00e0i \u0111\u1eb7t Perl<\/p>\n<p>B\u01b0\u1edbc 1:<\/p>\n<p>B\u1ea1n truy c\u1eadp v\u00e0o \u0111\u1ecba ch\u1ec9\u00a0http:\/\/www.activestate.com\/activeperl\/downloads v\u00e0 t\u1ea3i b\u1ea3n ph\u00f9 h\u1ee3p v\u1edbi H\u0110H c\u1ee7a m\u00ecnh.<\/p>\n<p>B\u01b0\u1edbc 2: Th\u1ef1c hi\u1ec7n c\u00e0i \u0111\u1eb7t, n\u1ebfu b\u1ea1n c\u00e0i \u0111\u1eb7t th\u00e0nh c\u00f4ng b\u1ea1n ch\u1ea1y c\u00e2u l\u1ec7nh:<\/p>\n<p>perl -v<\/p>\n<p>m\u00e0n h\u00ecnh s\u1ebd t\u01b0\u01a1ng t\u1ef1 nh\u01b0 sau:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"http:\/\/i.imgur.com\/5EDtrng.jpg\" alt=\"\" width=\"663\" height=\"258\" title=\"\"><\/p>\n<p>B\u01b0\u1edbc 3: Vi\u1ebft ch\u01b0\u01a1ng tr\u00ecnh \u0111\u1ea7u ti\u00ean s\u1eed d\u1ee5ng ng\u00f4n ng\u1eef Perl<\/p>\n<p>m\u00e3 ngu\u1ed3n nh\u01b0 sau:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"http:\/\/i.imgur.com\/fkD2NHC.jpg\" alt=\"\" width=\"487\" height=\"154\" title=\"\"><\/p>\n<p>th\u1ef1c hi\u1ec7n chay ch\u01b0\u01a1ng tr\u00ecnh v\u00e0 k\u1ebft qu\u1ea3 nhu sau:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"http:\/\/i.imgur.com\/8EOihel.jpg\" alt=\"\" width=\"401\" height=\"122\" title=\"\"><\/p>\n<p>V\u1eady l\u00e0 ch\u00fang ta \u0111\u00e3 th\u1ef1c hi\u1ec7n xong c\u00e1c b\u01b0\u1edbc \u0111\u1ea7u ti\u00ean.<\/p>\n<p>M\u1eddi b\u1ea1n tham kh\u1ea3o code t\u1ea1i:\u00a0https:\/\/github.com\/khanhnnvn\/Perl-Basic<\/p>\n<p>Ch\u00fac b\u1ea1n th\u00e0nh c\u00f4ng!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Gi\u1edbi thi\u1ec7u: Perl vi\u1ebft t\u1eaft c\u1ee7a t\u1eeb Partical Extration and Report Language t\u1ea1m hi\u1ec3u l\u00e0 ng\u00f4n ng\u1eef k\u1ebft xu\u1ea5t v\u00e0 b\u00e1o c\u00e1o th\u1ef1c d\u1ee5ng. Perl \u0111\u01b0\u1ee3c Larry Wall x\u00e2y d\u1ef1ng t\u1eeb n\u0103m 1987. M\u1ee5c \u0111\u00edch&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,6],"tags":[],"class_list":["post-329","post","type-post","status-publish","format-standard","hentry","category-perl","category-programing"],"_links":{"self":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/posts\/329","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/comments?post=329"}],"version-history":[{"count":0,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/posts\/329\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/media?parent=329"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/categories?post=329"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/tags?post=329"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}