An open API service indexing awesome lists of open source software.

https://github.com/younghakim7/perl_lang


https://github.com/younghakim7/perl_lang

Last synced: 5 days ago
JSON representation

Awesome Lists containing this project

README

        

# Perl_Lang

Perl Tutorial

https://youtu.be/WEghIXs8F6c


# Perl Install (macOS)

```
$ brew install perl
```


# Perl Language

https://www.perl.org/


# Terminal 창에서 실행하기

```
$ perl -e 'print "Hello World\n"'

Hello World
```


# .pl 파일 만들어서 실행하기

- perllib.pl

```
use strict;
use warnings;
use diagnostics;

use feature 'say';

use feature "switch";

use v5.16;

# Comment

print "Hello World\n";

my $name = 'GlobalYoung';

my ($age, $street) = (40, '123 Main St');

my $my_info = "$name lives on \"$street\"\n";

$my_info = qq{$name lives on "$street"\n};

print $my_info;

my $bunch_on_info = <<"END";
This is a
bunch of information
on multiple lines
END

say $bunch_on_info;

my $big_int = 181818181818119383287198;

# %c : Character
# %s : string
# %d : Decimal
# %u : Unsigned integer
# %f : Floating Point (Decimal Notation)
# %e : Floating Point (Scientific Notation)

printf("%u \n", $big_int + 1);

```

# Result

```
$ perl perllib.pl

Hello World
GlobalYoung lives on "123 Main St"
This is a
bunch of information
on multiple lines

18446744073709551615
```