perl Perl - Function Rand 10:54 AM Unknown No comments #!/usr/bin/perl use strict; use warnings; my $cond = 50; while($cond--){ my $rand = int(rand(4)); print "$rand\n"; } Share This: Facebook Twitter Google+ Stumble Digg Email ThisBlogThis!Share to XShare to Facebook Related Posts:Perl - Pattern Matching [ Print`s ... ]#!/usr/bin/perl use strict; use warnings; my $text = "encrypted key\n"; if ($text =~ /key/){ print qq/$text new print !\n/; } if… Read MorePerl - [ Shift ] #!/usr/bin/perl use strict; use warnings; my %hash = ('1' => 'Perl','2' => 'Linux','3' => 'Bioinformatics'); my $key = shift or die "Key … Read MorePerl - (school media) [hash , array]#file txt separado por tab alunosnotasbimestral ayes 8.5 6.5 7.0 10.0 andre 7.0 9.0 8.5 8.5 la 9.0 7.0 4.5 7.5 gui 4.5 8.0 … Read MorePerl - Pattern Matching [ regular expression ] Metacharacter: Actually, they are very useful and have special meanings within the patterns./ | () [] {} ^ $&nbs… Read MorePerl - [ Hash / Sub / Sort / Keys ] #!/usr/bin/perl use strict; use warnings; my (%HoHoA); @{$HoHoA{'1'}{'1'}} = (1..10); @{$HoHoA{'1'}{'2'}} = (11..20); @{$HoHoA{'1'}{'3'}} = (21..30… Read More
0 comentários:
Post a Comment