Skip to content

Instantly share code, notes, and snippets.

@vinitkumar
Created January 22, 2013 13:03
Show Gist options
  • Save vinitkumar/4594507 to your computer and use it in GitHub Desktop.
Save vinitkumar/4594507 to your computer and use it in GitHub Desktop.
my $a=4;
print foo(),"\n";
sub foo{my $a=$a;}
my @a=(10,5,1);
my @b=sort @a;
print "@b";
my $txt='I am learning Perl';
$txt=~/(w+)$/;
print $txt;
my $txt='I am learning Perl';
my($match)=$txt=~/\s(.*)\s/;
print $match,"\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment