subroutines of perl

#!/usr/bin/perl -w

@students = qw/Doreen Oskar Elin Sangeet Malin/;



&next_student;

&next_student;

sub next_student {
        $i++;
        print "the next student is $students[$i]\n";
}

the next student is Oskar
the next student is Elin
posted @ 2015-12-06 21:33  liuhui_pine  阅读(101)  评论(0编辑  收藏  举报