#!/usr/local/bin/perl use strict; use warnings; #my $shell = 5; my $shall = 2; my %count = ($shell=>1, $shall=>2); my $result = $count{ $shell || "/bin/sh" }++; print "$result\n";