On Sun, 11 Jan 2004, Oliver Schnarchendorf wrote:
> Okay... I think the problem here is that BBEdit doesn't use your
> Environmental variables.
>
> You can print them with the following one liner
>
> perl -e 'use Data::Dumper; print Dumper (\%ENV);'
>
> Do yourself a favor and put the above perl into a script [....]
Maybe I'm being naive, but in what way is this better than just using
plain old /usr/bin/env?
$ perl -e 'use Data::Dumper; print Dumper (sort \%ENV);' | head
$VAR1 = {
'CVSROOT' => '/usr/local/cvsrep',
'MANPATH' => '/sw/share/man:/usr/share/man:/usr/X11R6/man',
'HOSTTYPE' => 'powermac',
'MACHTYPE' => 'powerpc',
'SECURITYSESSIONID' => '860df50',
'SGML_CATALOG_FILES' => '/sw/etc/sgml/catalog',
'GROUP' => 'staff',
'HOME' => '/Users/cdevers',
'TERM' => 'xterm-color',
$ env | sort | headANT_HOME=/sw/lib/ant
CVSEDITOR=/sw/bin/vim
CVSROOT=/usr/local/cvsrep
DISPLAY=:0.0
EDITOR=/sw/bin/vim
GROUP=staff
HOME=/Users/cdevers
HOST=Booker.local
HOSTTYPE=powermac
INFOPATH=/sw/share/info:/sw/info:/usr/share/info
etc.
I can see that the output isn't identical; is the point of the
Data::Dumper one liner that you just want the %ENV data as Perl sees it,
and not as you have in a regular shell?
--
Chris Devers
had plumbing problems last night,
didn't get enough sleep to be
thinking altogether clearly