トップページ⇒php
1001コメント308KB

【Perl】初心者コーナー Part15

■ このスレッドは過去ログ倉庫に格納されています
0001nobodyさん02/08/08 23:19ID:???
いらっしゃーい、Perlの「コーディング」で困ってる人のスレです。

1:自分はこう言う事がしたい。
2:それでこんな風にやってみたが・・・
3:それだとこんなエラーが出て上手く行かなかった。

1と3が無いと誰も答えられないよ。
良い回答は良い質問から。一緒に勉強しましょう。

CGIだけど、なんか質問ある? Part 6 (その2)
http://pc.2ch.net/test/read.cgi/php/1025930486/
参考書籍の話題は【【Perl,CGI】参考書籍 第2版】
http://pc.2ch.net/test/read.cgi/php/988809842/
その他の雑多な話題は、【CGIに依存しないPerlの話題一般】
http://pc.2ch.net/test/read.cgi/php/991313362/
スクリプトの改造依頼は 【スクリプト改造工房 Part4】
http://pc.2ch.net/test/read.cgi/php/1012839651/

過去ログ、その他の役立ち情報は>>2-10あたりを見よう。
0002102/08/08 23:20ID:???
[過去ログ]
Part1 http://tako.2ch.net/test/read.cgi?bbs=perl&key=957208980 参照不能
 DAT: http://tako.2ch.net/perl/dat/957208980.dat
Part2 http://tako.2ch.net/test/read.cgi?bbs=perl&key=971817087 参照不能
 DAT: http://tako.2ch.net/perl/dat/971817087.dat
Part3 http://tako.2ch.net/test/read.cgi?bbs=perl&key=979894521 参照不能
 DAT: http://tako.2ch.net/perl/dat/979894521.dat
Part4 http://tako.2ch.net/test/read.cgi?bbs=perl&key=984430156 参照不能
 DAT: http://tako.2ch.net/perl/dat/979894521.dat
Part5 http://pc.2ch.net/php/kako/988/988728069.html
Part6 http://pc.2ch.net/php/kako/996/996075607.html
Part7 http://pc.2ch.net/php/kako/1000/10002/1000267444.html
Part8 http://pc.2ch.net/php/kako/1003/10039/1003900311.html
Part9 http://pc.2ch.net/php/kako/1009/10095/1009549309.html
Part10 http://pc.2ch.net/php/kako/1014/10145/1014556702.html
Part11 http://pc.2ch.net/php/kako/1017/10172/1017201229.html
Part12 http://pc.2ch.net/php/kako/1019/10199/1019917048.html
Part13 http://pc.2ch.net/php/kako/1022/10227/1022731565.html

[ひまぢん氏のミラー]
Part1 http://www.angelfire.com/ak5/2ch-web-program/kako/957208980.html
Part2 http://www.angelfire.com/ak5/2ch-web-program/kako/971817087.html
Part3 http://www.angelfire.com/ak5/2ch-web-program/kako/979894521.html
Part4 http://www.angelfire.com/ak5/2ch-web-program/kako/984430156.html
Part5 http://www.angelfire.com/ak5/2ch-web-program/kako/988728069.html
0003nobodyさん02/08/08 23:20ID:???
2げと
0004nobodyさん02/08/08 23:20ID:???
4get
0005102/08/08 23:20ID:???
[総合]
 ・Perl Com: http://www.perl.com/pub/
 ・CPAN.com: http://search.cpan.org/
 ・ActivePerl: http://www.activestate.com/
 ・CGI-ML:http://forest.ne.jp/cgi-ml/

[お薦め]
 ・Perlメモ: http://www.din.or.jp/~ohzaki/perl.htm ★読んどけ
 ・Perl Recipes: http://www.effectiveperl.com/recipes/
 ・Randal's WebTechniques columns: http://www.stonehenge.com/merlyn/WebTechniques/
 ・Perlの部屋: http://www.cc.rim.or.jp/~midorin/mad-p/perl/index.html
 ・Perl初心者の部屋:http://www.harukaze.net/~mishima/perl/
 ・Perlリファレンス:http://www.big.or.jp/~mio/ga/pl/plref/pl_ref.htm
 ・Perlのページ:http://homepage1.nifty.com/nomenclator/perl/
0006102/08/08 23:21ID:???
[Document&Tutorial]
 ・Perl News: http://www.news.perl.org/
 ・Perl Monks: http://www.perlmonks.org/
 ・use Perl; : http://use.perl.org/
 ・Learn Perl - Perl Education: http://www.devdaily.com/perl/edu/index.shtml
 ・Perldoc.com: http://www.perldoc.com/
 ・Using Perl5 in Web: http://docs.rinet.ru/Using_Perl5_in_Web/
 ・Rex Swain's Home Page: http://www.rexswain.com/
 ・Robert's Perl Tutorial: http://www.netcat.co.uk/rob/perl/win32perltut.html
 ・Perl Tuts: http://savage.net.au/Perl-tutorials.html
 ・Beginning Perl Tutorials: http://www.pageresource.com/cgirec/index2.htm
 ・jcode.pl の私的な解説書: http://www.mikeneko.ne.jp/~lab/kcode/jcode.html
 ・Logical Choice Software, Home Page: http://www.logsoft.com/perltips/
 ・Perlfect Solutions: http://perlfect.com/
 ・The Perl Archive : http://www.perlarchive.com/
 ・Perl6 & Parrot VM についての情報: http://dev.perl.org/perl6/
 ・use Object; : http://perl.infoware.ne.jp/

0007nobodyさん02/08/08 23:21ID:???
zusa----------------------------------------------------------------
0008102/08/08 23:21ID:???
[Module]
 ・Perl Module Reference: http://www.bekknet.ad.jp/~bero/docj/module_/
 ・PPMPackages: http://www.activestate.com/PPMPackages/
 ・河馬屋二千年堂's Page: http://member.nifty.ne.jp/hippo2000/index.htm

[Security]
 ・安全なプログラミングのためのガイドライン:http://www.FreeBSD.org/ja/security/#spg
 ・Perl security:http://www.perldoc.com/perl5.6/pod/perlsec.html
 ・Perl security和訳:http://www.kt.rim.or.jp/%7ekbk/perl5.005/perlsec.html
 ・CGI and Security http://www.ansi.co.jp/tech/cgi/security/
 ・The Unofficial Web Hack FAQ:http://www.nmrc.org/faqs/www/
 ・How to Write Secure Code:http://www.shmoo.com/securecode/
 ・Safe CGI Programming :http://www.improving.org/paulp/cgi-security/safe-cgi.txt

[OS]
 ・Linux日本語マニュアル:http://www.linux.or.jp/JM/
 ・FreeBSD日本語マニュアル:http://www.jp.freebsd.org/man-jp/
0009102/08/08 23:22ID:???
なんとか>>2-10に収まってホッと一息
0010nobodyさん02/08/08 23:22ID:???
--------------------------------終了---------------------------------
0011nobodyさん02/08/08 23:23ID:???
>>10=前スレ1000 死ね
00121102/08/08 23:25ID:???
コテハンは死ね
00131102/08/08 23:27ID:???
>>12=10
騙んなボケ
0014nobodyさん02/08/08 23:29ID:???
香ばしいな
00151102/08/08 23:33ID:???
>>12=10
騙んなボケ
00161102/08/08 23:33ID:???
>>12=10
騙んなボケ
00171102/08/08 23:34ID:???
>>12=10
騙んなボケ
0018nobodyさん02/08/08 23:42ID:???
荒れてるな。ぷっ
0019nobodyさん02/08/08 23:56ID:???
         \   !   |!  /::l  | | |i  |i \   ヽ  ヽ ヽ
       ノ (  \|   ||   !:::i  | | |:|  !ヽ \  ヽ、 ヽ ヽ  \
        ⌒    \ |:|  |.:.:.:i  |i.|! |.:|  |:.\ ヾ/ ヽ\ヽ ヽ   ヽ  |
        立  気 | |::|l、 |ノ (.! i|l.| |.:|i  i.:.:.\/、\. ヽ:ヽヽ ヽ    i  |
              | |: !lヽ|.:⌒:.ヽ ヾ:l !.:.ヽ i..:../\ヽ‐'',..i -', !、. ヽ   |  |
        て   や | |!‐!-l,\:..:..:ヽヽ:i|:..:..ヽ. i:/..:..;.>,ヾ\i  ',l i,     !  i
 ┌──           |.i.l i. |``'ヽ、.:.ヾ!.ヽ.:..:.ヽ//  ヾ、 ヽ  'X,    |  |
 ノ 豆寸   ん  す  | ヽ ヽ!   \.:..\..:..:.//\  ・ \  /.: .i      |
                 |      ・  ヽ!|l.:.ll/.:ヽ、      /:. :. :. :i      |
         じ   く  |、       ノ:.:.:.:.:.:.:.:.:.:.:`'''‐----‐'"..:、_, :. :. .i 
                | `''ー----‐''".:.:.:.:.:.   :.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:) (   lヽ
  ──    ゃ   ス |\:..:..:..:..:..:..:..:  ,             ⌒  / ! |i
  l二,二l             二ニ=‐      ヽ               / | | !
 ノ フラ    ね   レ | |l ヽ\.  r ,....._______     /:  | | |
              |  !ヽ\ \ヽヽ, ,、        ,、,ィ‐ヽ  /:::  | l |!
            |       |  |l,ヽ ヾ; `i‐、ヽ `´`´__,,,... -─‐''''゙,/:::::::   |. | |,i  |ヽ|
 !!!         |  |、.i \ヽ  i  i`''ーニ_ -‐‐   ,.、':::::::::::   l i'"i l  |  |
         ゾ    /,  |ヽヽ \、 l  |  | iヽ._, イ / `ヽ:::   , | / |/| !  |
                 / |  | ヽヽ  \ |  l  | |  | | |/ /| .ヽ  / l / /  | i  |
            /l l  !  \    iヽ |  | i  | /i | / l | V  l/ /   i   |
0020nobodyさん02/08/09 03:31ID:bBZPsuqF
ここ(太洋社のコミック発売一覧)

ttp://www.taiyosha.co.jp/comic/comic0209_date1.html

にある HTML を LWP::Simple の get を使って取得してみたんですが、
いつもは

@lines = split(/\n/, (get $target_url));

みたいにするとサクっと取得できるのに、このサイトのソースだと
文字列の終端のコードがちょっと違うらしくてうまく split できないん
ですけどどうしたらよいのでしょうか?

色々と試してはみたのですけど、ちょっとよくわからなかったので
ココでお聞きしてみました。
どうぞよろしくお願いします。
0021nobodyさん02/08/09 03:45ID:???
>>20 /\x0D\x0A|[\x0D\x0A]/ でどうぞ。
0022nobodyさん02/08/09 04:25ID:???
( ゚д゚)ハッ! 立ってる!
0023nobodyさん02/08/09 06:37ID:???
( ゚д゚)ハッ! 立ってる! 2
0024nobodyさん02/08/09 06:56ID:???
これは

use lib './module';

test.cgiに

use lib './module';
use module;

のように記述するんでしょうか?
00252402/08/09 07:08ID:???
ありがとうございます。できました(´_`)ノ
0026nobodyさん02/08/09 11:22ID:???
%hogeというハッシュがあります。
中身は 名無し=> 2 ひろゆき=>5 ネオ麦茶=>3
という感じです。
で、これを値(数字)の大きい順に名前を表示したいんですがどうしたいいでしょうか。
0027nobodyさん02/08/09 11:32ID:???
>>26
あらかじめ値がわかってる場合はこうすりゃいいじゃん。

print "ひろゆき\nネオ麦茶\n名無し\n";
0028nobodyさん02/08/09 11:59ID:???
>>26
値でソート
sort { $hoge{$b} <=> $hoge{$a} } keys %hoge
0029nobodyさん02/08/09 13:56ID:???
>28
ソート出来たら$hogeをどうするんですか?
0030nobodyさん02/08/09 14:13ID:???
なんなりとお好きなように
0031nobodyさん02/08/09 14:41ID:???
>>29
その質問おかしいだろ。w
print sort { $hoge{$b} <=> $hoge{$a} } keys %hoge;
で確認してみ。
0032g02/08/09 14:48ID:pPvuKcdo
-------風俗の総合商社・MTTどこでも-------

〇デリバリーヘルス〇デートクラブ〇女性専用ホストクラブ〇
〇ハードSM奴隷クラブ〇レズビアン倶楽部〇ホモ・オカマ倶楽部
〇変態痴女と遊ぶ会〇痴漢・覗き趣味の会〇変態同好会・各種!
●楽しく遊べます! 090-8002-8356番
-----------美男・美女会員など多数在籍中-----------
  http://www.mttdocomo.jp/
-----女性アルバイト随時募集・高収入(日払い)月100万円可能住み込みも可
-----レズビアン・スタッフ●ホモスタッフ●女性専用ホストスタッフ同募-----
http://www.mttdocomo.jp/
------------------------------------------------
0033nobodyさん02/08/09 14:49ID:???
>>32
氏ねよ。
0034nobodyさん02/08/09 14:50ID:???
ひろゆき 5
ネオ麦茶 3
名無し 2

こういう感じで名前と値を表示させたいんですけど
print sort { $hoge{$b} <=> $hoge{$a} } keys %hoge;
これだと名前しか出なかったでし。
■ このスレッドは過去ログ倉庫に格納されています