6

using variables in perl not working

view full story
linux-howto

http://www.unix.com – sdcprd@dotstoas110:$ echo $F2 1327332411 this works ---------- sdcprd@dotstoas110:$ perl -MPOSIX -le 'print strftime ("%m%d%y",localtime (1327332411))' 012312 <<<< correct date this doesnt ----------- sdcprd@dotstoas110:$ perl -MPOSIX -le 'print strftime ("%m%d%y",localtime ($F2))' 123169 sdcprd@dotstoas110:$ perl -MPOSIX -le 'print strftime ("%m%d%y",localtime (${F2}))' 123169 how can i use variable in this perl expression ? thanks Moderator's Comments: (HowTos)