#!/usr/bin/perl -- use strict; use warnings; Main( @ARGV ); exit( 0 ); sub Fudge { use Errno(); join qq/\n/, "Error @_", map { " $_" } int( $! ) . q/ / . $!, int( $^E ) . q/ / . $^E, grep( { $!{$_} } keys %! ), q/ /; } sub Main { for my $unfile ( 'NUL', './..', 'XYZQQQQQQQQQ', ){ unlink $unfile or warn Fudge( $unfile ); } } __END__ Error NUL 22 Invalid argument 87 The parameter is incorrect EMARCH_ENC_I17_IMM41a_VAL_POS_X EMR_SETTEXTALIGN EVENT_SYSTEM_MINIMIZESTART ERROR_BAD_COMMAND EINVAL at - line 20. Error ./.. 22 Invalid argument 5 Access is denied EMARCH_ENC_I17_IMM41a_VAL_POS_X EMR_SETTEXTALIGN EVENT_SYSTEM_MINIMIZESTART ERROR_BAD_COMMAND EINVAL at - line 20. Error XYZQQQQQQQQQ 2 No such file or directory 2 The system cannot find the file specified ETO_OPAQUE ERROR_LABEL_QUESTIONABLE EDS_RAWMODE EWX_REBOOT EC_QUERYWAITING EIMES_CANCELCOMPSTRINFOCUS ENOENT ELEMENT_STATUS_IMPEXP ENABLE_WRAP_AT_EOL_OUTPUT ES_RIGHT EV_RXFLAG ERROR_FILE_NOT_FOUND EVENTLOG_WARNING_TYPE EVENPARITY ENOFILE ESB_DISABLE_RTDN EMARCH_ENC_I17_IMM41c_INST_WORD_X EEInfoNextRecordsMissing ES_DISPLAY_REQUIRED ESB_DISABLE_RIGHT EVENT_MODIFY_STATE EMR_POLYBEZIER ENABLE_LINE_INPUT EVENT_SYSTEM_ALERT EXCEPTION_UNWINDING EC_RIGHTMARGIN EVENTLOG_END_PAIRED_EVENT EXTEND_IEPORT ExceptionNestedException ESB_DISABLE_DOWN EVENTLOG_SEEK_READ at - line 20.

In reply to Re^3: current directory ($! $^E %! Fudge ) by Anonymous Monk
in thread current directory by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.