m// is written with a regexp between the slashes and returns true (1) if 
the regexp matches the string in
an internal variable. Or if one writes "$a =~ m/foo/" where $a is a 
string variable then if $a contains "foo"
and "foo" is a regexp the statement will return 1.

s/// is a substitution operator which works similarly but substitutes 
the string between the second and third
slash for the regexp between the first and second slashes.

This is an oversimplification of what they do because they have 
modifiers etc. but I assume there is a way
of matching or substituting regexps in Unicon.

Regards

_John Sampson_

On 30/01/2011 17:15, Steve Wampler wrote:
> John Sampson wrote:
>> How would one do in (Un)Icon what Perl does with its m// and s/// 
>> operators?
>
> Uh, what does Perl do with those operators?
>
> Keep in mind that Perl and Unicon have different approaches to problem
> solving and that a literal translation from one to the other may not 
> be the best way to perform similar tasks.
>
> I'll be happy to explain how I'd accomplish the same task using Unicon
> that one would use m// and s/// in Perl, once I know what those
> operators do.  Other people will have different approaches, of course.
>


------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Unicon-group mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/unicon-group

Reply via email to