git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-remote: Use of uninitialized value in string ne, line 248

From
RWRalf Wildenhues <ralf.wildenhues@gmx.de>
Date
Oct 24, 2007, 20:40 UTC
Message-ID
<20071024204010.GC15978@ins.uni-bonn.de>
In-Reply-To
<20071024202724.GA2292@piper.oerlikon.madduck.net>
* martin f krafft wrote on Wed, Oct 24, 2007 at 10:27:24PM CEST:
> 
> perl -e 'print "The earth is a disk!\n" if ( "earth" == "flat" );'

Well, numerical equality and string equality are two different things, try eq instead (see: perldoc perlop).

> Is there a way to make it explicit that you're checking for a value
> being defined, where a "false" value would count as true, just as
> long as there is a value?
Yes.  It's called "defined".
  perl -e 'my $a=0; print "yes\n" if defined $a;'
It should be used here, to allow "0" branches.

Cheers, Ralf

Previous: martin f krafftNext: Junio C Hamano
Message 6 of 8 in “git-remote: Use of uninitialized value in string ne, line 248”
  1. martin f krafftOct 24, 2007
  2. Junio C HamanoOct 24, 2007
  3. martin f krafftOct 24, 2007
  4. Alex RiesenOct 24, 2007
  5. martin f krafftOct 24, 2007
  6. Ralf WildenhuesOct 24, 2007
  7. Junio C HamanoOct 25, 2007
  8. Pierre HabouzitOct 24, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.