开始再次记录下自己的足迹

来源:互联网 发布:c语言从小到大输出 编辑:程序博客网 时间:2024/05/16 12:28

11月要结束了,汇编考完,没有想象中的好。

哪有那么多时间纠结,不如开始新的旅程吧!


 前一段时间Perl开了个头,两周没看,已经快要忘记了,整理一下。

内容是Perl的变量。


#!perluse strict;use warnings;use diagnostics;#variaty# $ and @ is sigil# $ maybe means single# @ means array# % means hashmy $nick_name = 'Run_dream';my @team_mates = ('Hexu','Ganjun','Wuxiaosong');my $nick = $nick_name;print "$nick\n";#instead of using "" and '',we can use q{},qq{};print qq{$nick\n\n}; #使用当前-结尾模型my $message = <<"END";Dear mom,  I am fine.Sincerely,Run_dreamENDprint $message;# numbermy $answer = 4.39;print "$answer\n";print int($answer*100);# arraymy $nine = 9;my @stuff = (7,'of',$nine);print "\n",@stuff,"\n";print "@stuff\n";print $stuff[0],"\n";print $stuff[-1],"\n";# hashmy %people=("Alice",1,"Bob",2,"Ovid","idoit",);my $number = $people{'Bob'};print "Bob = $number\n";print "Bob = $people{'Bob'}\n";$people{Austem}='Jane';for my $name (keys %people){print "$name is $people{$name}\n";}my %vegetables =( 'celery' => 'yuck','spinach'=>'delicoius');#切片my @num = @stuff[0,-1];print "@num\n";my @taste = @vegetables{'celery','spinach'};print "@taste\n";








0 0
原创粉丝点击