#!/usr/bin/perl -l use warnings; no warnings 'deprecated'; use strict; my $fieldnum = 1; my $hashref = [ { $fieldnum => '$/ 1l' } ]; my $value = $hashref->{ $fieldnum }; print $value;