Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- use strict;
- use warnings;
- my @t = (4, -5, 7);
- push(@t, -2, 3);
- print "@t\n";
- unshift(@t,0,-1);
- print "@t\n";
- $t[3] = 9;
- print "@t\n";
- @t = map($_*2,@t);
- print "@t\n";
- @t = grep($_>=0,@t);
- print "@t\n";
- @t = sort {$b <=> $a} @t;
- print "@t\n";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement