difftastic/vendored_parsers/tree-sitter-perl/examples/function.pl

35 lines
452 B
Perl

use strict;
use warnings;
use Data::Dumper;
use feature 'signatures';
sub simple {
# my @args = @_;
print "this is simple\n";
my $variable = 1;
print $variable;
return;
}
print "hello world!\n";
my $hello = "hello";
print $hello;
simple;
simple();
simple('hola');
sub foo : Expose ($left, $right) {
return $left + $right;
}
foo();
print "\n";
my @chars = map chr, qw(1 2 3);
print "chars..." . Dumper \@chars;
map chr, qw(1 2 30);