# ... as before, set $jar = ... sub callback { # 0 version # 1 key # 2 val # 3 path # 4 domain # 5 port # 6 path_spec # 7 secure # 8 expires # 9 discard # 10 hash #-- add more comparisons to narrow the search result print "Cookie: $_[2]\n" if $_[2] =~ /^8430/; } $jar->scan( \&callback );