http://www.perlmonks.org?node_id=438889


in reply to This is not a pipe

! /^\|$/; $this !~ /^\|$/; ord($this) != 124; ord($this) != 0x7c; ord($this) != 0174; seek(THIS, 2, 0); `ls -l $this` !~ /^p/; ! -p _; return ! -p _; -p _ && die; die if -p _; return 1 unless -p _; use Test::More; isnt($this, 'pipe', 'Magritte check'); $this ne 'a|'; next unless /^(\w)\|$/; next if $1 eq 'a'; open(my $fh, "a|"); while(<$fh>) { die if /\Q$this\E/; }