in reply to Re: gimme some sed
in thread gimme some sed

well I did include the error message. anyway I guess I was confused by the fact that you can 'print' @ARGV and the output is all the arguments. I guess I thought I was trying to do this --> $allargs = `print @ARGV` which I see I can achieve by saying $allargs = "@ARGV"; These are subtleties I miss, though it makes sense. While I am using the first reply option, I see that I can use my original method with your tips.
my $arg1 = $ARGV[0]; my $restargs = "@ARGV"; $restargs=~s/$arg1 //g;
Is there any harm in dispensing with spaces around = marks apart from readability ? BTW Goedel could have used a sanity check tool.

Replies are listed 'Best First'.
Re^3: gimme some sed
by swampyankee (Parson) on Oct 06, 2006 at 14:30 UTC

    Is there any harm in dispensing with spaces around = marks apart from readability ?

    Putting -- or not putting -- whitespace around most operators is largely a matter of taste. (One must put whitespace around operators like or, gt, etc). Putting whitespace within operators is a bad idea; =~ is one operator; = ~ is two. If your editor does stuff like adding spaces where they don't belong, I'd suggest a new one.

    emc

    At that time [1909] the chief engineer was almost always the chief test pilot as well. That had the fortunate result of eliminating poor engineering early in aviation.

    —Igor Sikorsky, reported in AOPA Pilot magazine February 2003.
Re^3: gimme some sed
by GrandFather (Saint) on Oct 06, 2006 at 18:52 UTC

    Whileitisamatteroftastetodispensewithspaces,personallyIfindithelpsreadabilitytousethem.


    DWIM is Perl's answer to Gödel