Date: 10 Sep 2001 21:45:45 -0400 From: stanb@panix.com (Stan Brown) Subject: Re: Probelm with undefined atgumnets Message-Id: <9njqc9$e2m$1@panix2.panix.com> In <9nj09f$bum$1@mamenchi.zrz.TU-Berlin.DE> anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) writes: >According to Stan Brown : >> A kind member of this group showed me a neat trick to print out the >> arguments to a given function. It goes like this: >> >> join ', ', map { "Arg$_ ->$_[$_]<-" } 0 .. $#_; >> >> This works great _except_ when I pass in undef for an argumentm then I get >> a warning about concatenating an unitliazed variable. >> >> How can I improve thsi to allow for this case? > join ', ', map "Arg$_ " . ( defined $_[$_] ? "->$_[$_]<-" : '-undef-'), > 0 .. $#_; >Or switch off the offending warning locally, but then you won't see >the difference between "" and undef. Cool! Thnaks for the help!