one-liner to see contents of @INC from command line
perl -e 'print join("\n", @INC), "\n"'

Replies are listed 'Best First'.
Re: contents of @INC
by Juerd (Abbot) on Mar 30, 2002 at 18:54 UTC

    You might like Perl's -l command line switch. One of the things it does is setting $\ (the output separator) to a supplied value, or to $/. $/ is \n by default. So if you use perl -le'', newlines are automatically added to prints. Together with the for modifier, you can write your script as:

    perl -le'print for @INC'

    U28geW91IGNhbiBhbGwgcm90MTMgY
    W5kIHBhY2soKS4gQnV0IGRvIHlvdS
    ByZWNvZ25pc2UgQmFzZTY0IHdoZW4
    geW91IHNlZSBpdD8gIC0tIEp1ZXJk
    

Re: contents of @INC
by Kanji (Parson) on Mar 29, 2002 at 21:37 UTC

    A little more useful if you have relative paths in your @INC...

    perl -MCwd=abs_path -le 'print for map abs_path($_), @INC'

        --k.