Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: Shell expansion with is funky

by japhy (Canon)
on Jan 25, 2002 at 02:39 UTC ( #141355=note: print w/replies, xml ) Need Help??

in reply to Shell expansion with <> is funky

Your question has been answered, but I'd like to make another comment. Please do not use prototypes. It's clear from the code that you don't know how Perl requires them to be presented for them to operate properly.

A function with a prototype must be declared or defined prior to the function being called. In addition, a function that calls itself must be declared before it is defined, if it is to have a prototype. When calling the function, the prototype is ignored if you preface the function call with an ampersand. You've violated two of those rules; your prototype is wasted.

There's also the grim fact that prototypes in Perl are far less useful than most programmers expect them to be, and they enforce often bizarre requirements on the arguments to functions -- some of these have been fixed only in the most recent versions of Perl.

Prototypes are deep magic, and even the best magicians get by without invoking them.

Jeff[japhy]Pinyan: Perl, regex, and perl hacker.
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;

Replies are listed 'Best First'.
Re: Re: Shell expansion with is funky
by tommyboy (Initiate) on Jan 25, 2002 at 03:42 UTC
    I appreciate the work around the sage advice about prototypes - I would beg to differ with japhy , however, that my question has been answered. I could use glob , but I would rather use <> and I am not sure why the angle brackets are not behaving as advertised. My question is, in a nutshell - why are angle brackets not resulting in correct shell expansion on succesive iterations of a loop. This is puzzling and still remains unanswered. Thanks, Tom
      I cannot replicate your problem.

      Jeff[japhy]Pinyan: Perl, regex, and perl hacker.
      s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://141355]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2022-01-19 21:00 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (56 votes). Check out past polls.