3 ms·
$| is related to pipes. Much of the sigils are like this.
by wbl 6y ago
$| is related to pipes. Much of the sigils are like this.
- proverbialbunny 6y agoIt suddenly makes sense and isn't so bad. The $ is a sigil, so it appears before variables like $var, so it's just saying | it out. When typed at the beginning of a one liner it becomes quite obvious what you want. This is clearly not a feature for a large project, but a quick UNIX style one off awk-like script.
- cutler 6y agoIn Perl `$` is strictly a scalar variable though this can be a reference to an array, hash or object as they are stored as references. Not to be confused with `$` in PHP which simply denotes a variable of any kind. In Bash `$` denotes the value of a variable.