in reply to Re: Fetching cookies without errors?
in thread Fetching cookies without errors?

Thank you for your reply Corion but it doesn't seem to matter that much the problem is with the ->value. If a cookie doesn't exist it flags a 'Can't call method "value" on an undefined value at line #' because it's trying to read a value from a cookie that doesn't exist? I was using the if (exists $cookies line to lose the error but when a cookie does exist the if line seems to stamp on the data leaving it undef?

Replies are listed 'Best First'.
Re^3: Fetching cookies without errors?
by hippo (Archbishop) on Aug 23, 2017 at 15:28 UTC
    if (exists $cookies line to lose the error but when a cookie does exist the if line seems to stamp on the data leaving it undef?

    That will be because in your sample code you overwrite the %cookies hash immediately on the next line. Don't do that if the hash already exists (it's pointless).

      Thank you Hippo I think that was it... two suggestions from you guys and I'm smiling again. Thanks so much to all