https://github.com/younghakim7/perl_lang
https://github.com/younghakim7/perl_lang
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/younghakim7/perl_lang
- Owner: YoungHaKim7
- Created: 2022-11-19T11:55:45.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-19T12:16:33.000Z (over 2 years ago)
- Last Synced: 2025-03-06T09:57:03.283Z (3 months ago)
- Language: Perl
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
ENDsay $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.plHello World
GlobalYoung lives on "123 Main St"
This is a
bunch of information
on multiple lines18446744073709551615
```