Converting AWK to Perl -


i'm having trouble figuring how convert simple awk command perl

awk -f: '{if($3 > 999 && $3 < 30000){ print $1}}' /etc/passwd 

thoughts?

#!/usr/bin/perl          use strict; use warnings;  while (1) {    ($user, $uid) = ( getpwent() )[0,2]       or last;     print("$user\n")       if $uid >= 1_000 && $uid < 30_000; }  endpwent();