DEV Community 👩‍💻👨‍💻

Yuki Kimoto - SPVM - Perl Club
Yuki Kimoto - SPVM - Perl Club

Posted on

Perl is enough easy to learn

I saw often the misleading information "Perl is difficult to learn".

Personally I feel Perl is enough easy to learn.

I write a program.

Input

kimoto,19,Japan
Ken,23,US
Pony,29,UK

Output

kimoto-19-Japan
Ken-23-US
Pony-29-UK

Program

use strict;
use warnings;

while (my $line = <DATA>) {
  chomp $line;
  my @items = split(/,/, $line);
  print join('-', @items) . "\n";
}

__DATA__
kimoto,19,Japan
Ken,23,US
Pony,29,UK
Enter fullscreen mode Exit fullscreen mode

Let's play this program on PerlBanjo.com

Top comments (0)

Super Useful CSS Resources

A collection of 70 hand-picked, web-based tools which are actually useful.
Each will generate pure CSS without the need for JS or any external libraries.