programming-examples/perl/String/Join the result of the split function.pl

12 lines
241 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
#!/usr/bin/perl -w
use strict;
my $passwd = "A:B:C:D::/value1/value2:/value3";
my @fields = split /:/, $passwd;
my $passwd2 = join "#", @fields;
print "Original password : $passwd\n";
print "New password : $passwd2\n";