in reply to Problem with parameters in subroutines

sub write { my ($contestant) = @_; print "$contestant->{'nazwisko'} "; print "$contestant->{'imie'}"; print ":$contestant->{'id'}\n"; }

it's hard to tell from the code given¹ how to best call write()

If your claims are right, this should work  write($kandydatkonkursu) ...

...but I think it should rather be  write($guest)!

Cheers Rolf

( addicted to the Perl Programming Language)

¹) including Polish(?) variable names mixed with English ... ;-)

update

Replies are listed 'Best First'.
Re^2: Problem with parameters in subroutines
by aatrox (Initiate) on Jun 02, 2014 at 12:21 UTC
    Thanks for the answer. I have done as you said and i got Not a GLOB reference at dziala.pl error, sorry for my code i will repair it i wanted to translate it from polish to english but forgot to change working part withour subroutine :)
      > ... from polish to english but forgot ...

      Look for me it doesn't matter how you name your variables as long as your code...

      • has a consistent language
      • and is working.
      (just don't expect it to be self-documenting for too many people ;)

      Regarding you error please post working code which reproduces the problem.

      Cheers Rolf

      ( addicted to the Perl Programming Language)