scan string
Description
s ? expr : x
s ? expr saves the current subject, &subject, and position, &pos and then sets them to the values of s and 1, respectively. It then evaluates expr.
The outcome is the outcome of expr.
&subject and &pos are restored on exit from expr to their saved values.
Parameters
- s
- subject string
- expr
- pattern matching expression
- returns
- result of evaluating expr
Errors
See Also
- ?x — generate random value