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

【Perl】初心者コーナー Part12

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

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

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

CGIの質問は【CGIだけどなんか質問ある Pert 6 】
http://pc.2ch.net/test/read.cgi/php/1019561283/
参考書籍の話題は【【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を見よう。
 
0002nobodyさん02/04/27 23:17ID:1NNXdNsp
[過去ログ]
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/test/read.cgi/php/996075607/
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/test/read.cgi/php/1009549309/
Part10 http://pc.2ch.net/test/read.cgi/php/1014556702/
Part11 http://pc.2ch.net/test/read.cgi/php/1017201229/

[ひまぢん氏のミラー]
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/04/27 23:17ID:1NNXdNsp
[総合]
 ・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 Recipes: http://www.effectiveperl.com/recipes/
 ・Perlメモ: http://www.din.or.jp/~ohzaki/perl.htm
 ・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/
[Document&Tutorial]
 ・Perl News: http://www.news.perl.org/
 ・Perl Monks: http://www.perlmonks.org/
 ・PerlMonth - Online Perl Magazine - : http://www.perlmonth.com/index.html 接続不能
 ・use Perl All The 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/
0004nobodyさん02/04/27 23:17ID:1NNXdNsp
[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/
0005nobodyさん02/04/27 23:32ID:???
>>1
乙カリー
0006nobodyさん02/04/27 23:41ID:???
キーボードから文字数を制限して入力するにはどうすればいいのか教えれ。《ら抜き表現》
0007hanamogera ◆kkkKkkko 02/04/27 23:49ID:zKZtkfuA
りげなく・・・漏れが作った携帯端末掲示板スクリプトを公開。
あんまり激しく叩かないで〜
http://www.sgmt.jp
0008nobodyさん02/04/27 23:57ID:???
>>7
      ∧_∧  / ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄
    (∩・∀・)< もしもし…何がしたいのかもうちょっと具体的におながいします
□……(つ   ) \___________
 ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄|

textareaに書かれた文字数をcgiにわたる前にチェックしたいということかな?
0009nobodyさん02/04/27 23:58ID:???
>>8
>>7じゃなくて >>6だった。hanamogeraさん失礼
0010nobodyさん02/04/28 00:04ID:???
>>6
歴史(?)は繰り返す
http://pc.2ch.net/test/read.cgi/php/991313362/261
0011pear ◆FRUIT8pk 02/04/28 00:07ID:???
>>8
カワ (・∀・) イイ!!
0012nobodyさん02/04/28 00:47ID:???
で、結局前スレ975は何が聞きたかったんだ?
0013nobodyさん02/04/28 01:28ID:???
聞いてアロエリーナ ちょっと言いにくいんだけど
2年前Perlに挫折して、VBS、PHPやってきたんだけど
昨日 Perlのリファレンス読んだら 理解できたの
ちょっとうれしいな!
聞いてくれてあーりがと アロエリーナ♪
\______ ________/
          |/
         ∧_∧
   Ψ     (∀・  )
   □     (∩∩  )
 ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄
0014nobodyさん02/04/28 01:49ID:???
perlは挫折する部分がありません。
0015nobodyさん02/04/28 01:59ID:???
>>14
型なし言語でクラスのまねごとし始めた時点で萎えました。
今後はObjectPascalで行こうかと考え中。
0016nobodyさん02/04/28 02:16ID:???
Perl6まで待ってくれ。
0017nobodyさん02/04/28 18:19ID:???
いつまで?
0018nobodyさん02/04/28 21:44ID:???
オープンしたファイルは、プログラムがexit;で終了するとcloseしなくても、勝手にクローズされるのでしょうか?
0019nobodyさん02/04/28 22:14ID:9I+rPdRi
>>18
クローズされます。
exit 以外でも、終了するとクローズされます。
0020継続02/04/28 22:20ID:???
1. if ($string eq "hoge") {
2. if($string eq "hoge"){
3. if ( $string eq "hoge" ) {
4. if( $string eq "hoge" ){
どれが好きですか?細かいけど

1と4が一人ずつ
0021_gunzip02/04/28 22:31ID:???
>>20 1でふ。
Perl6では、if/for/foreachなどの()は必要なくなりますが...。
0022nobodyさん02/04/28 22:44ID:???
>20
制御構造では空白を挟むのが一般的。(if, while, foreach, for ...)
パーレン中の両端は普通空白を入れない。(*)
よって「1」。

(*)条件式が複雑で、パーレン中の端に空白を入れた方が見やすくなる場合は
そうするかもしれない。
0023nobodyさん02/04/28 23:12ID:???
>>19
ありがとうございます。
0024nobodyさん02/04/28 23:16ID:???
全角の文字列の一文字おきに、何か記号を付け加えるにはどうすればよいのでしょうか?

お願いします
↓
お<>願<>い<>し<>ま<>す<>

こんな感じにしたいのですが。
0025nobodyさん02/04/28 23:24ID:???
>>24
文字コードは?
0026nobodyさん02/04/28 23:30ID:???
EUCに変換して
s/([\200-\377]{2})/$1<>/g;
0027nobodyさん02/04/29 00:30ID:???
>21
Perl6 じゃなくても if/for/foreachなどの() が必要とは限らないだろ!

`kill -KILL _gunzipのPID` if $user eq '_gunzip';

>24
環境の文字コードを早く書け、ボケ!
0028nobodyさん02/04/29 00:31ID:pMsSvLdB
質問なんですが、ハッシュのすべての要素に関して
添え字と値両方を操作したいんです。
例えば配列@aのすべての要素に関して
foreach $_ (@a) {print "添え字=$_";}
こういう感じのことを添え字が予めわからない場合
どのようにしたらいいでしょうか。
0029nobodyさん02/04/29 00:37ID:???
>>28
keys
each
などなどを検索
0030nobodyさん02/04/29 00:39ID:???
ありがとうございます!
調べてきます。
0031nobodyさん02/04/29 00:53ID:???
>>26
ありがとうございます。
sjisにも対応させるには
s/([\200-\377][\000-\377]|[\000-\377])/
でいいのでしょうか。
やってみたところ無事に動いてるっぽいのですが。
0032nobodyさん02/04/29 01:06ID:???
>>31
http://www.din.or.jp/~ohzaki/perl.htm#Character
0033nobodyさん02/04/29 01:24ID:???
ここって、初心者がくるところなんだぁ。 なんか安心した。

で、どういうことを質問すればいいの?
0034nobodyさん02/04/29 03:02ID:???
(´-`).。oO(>>33 あなたが 12〜15歳の女性なら、全身写真うpしてから話そうよ…)
■ このスレッドは過去ログ倉庫に格納されています