# Perl program to demonstrate the # splitting into the hash #!/usr/bin/perl use strict; use warnings; # hash to be split my $has = 'GFG=1;GEEKS=2;PROGEEK=3'; # using split function my %spl = split(/[=;]/, $has); # after splitting displaying the values foreach my $i (keys %spl) { print "$i:$spl{$i}\n"; }