perl notes【1】
文章目录
- starting with Perl
- references
starting with Perl
- the first program with Perl which simply output to the screen “你好,世界” as follows.
#!/usr/bin/perl
use v5.40.2;
use strict;
use warnings;print "hello,world\n";
through the perl
command following the program name running in the terminal of OS
perl learn1.pl
- the Perl programming language was designed to achieve the common task specially as text treatment which is its original aim, and through the growth of Perl ,some facilities such as web development ,system administration, , network programming, GUI development, and so on.
- the anything within double quotations will keep intact to output. for example:
#!/usr/bin/perl
use v5.40.2;
use strict;
use warnings;print"Hello, world";
the output result will be as follows.
Hello,world
- the variable in Perl has dynamic type formed such as
$var_name
which include the$
symbol immediately behind the variable name$var_name
.
#!/usr/bin/perl
use v5.40.2;
use strict;
use warnings;my $x=11;
my $y=111;
print $x+$y;
the output will be 122
references
- https://www.perl.org/