[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] passive input request



On Fri, Sep 17, 1999 at 07:57:31PM -0700, Nicholas G. Thornton wrote:
> Another question for the same program. how would you check to see if 
> something begins the input string. 
> 
> For example... 
> from the command line "die" is a command. But from any other input 
> source I want only strings beginning in "--" to be commands (ie 
> "--die"). using $input =~ /--/ allows for things such as "die--", 
> "TEXT--die", "die, billy jo bob--!!"... . 
> 
> Also is there a way to do wildcard charecters? 
> 

Please read the perlre documentation.


/^--/

/.*/


Ronald

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org