special-variables Questions
2
Solved
I would like to use $a and $b variables in my anonimous binary functions like it is done in sort {$a <=> $b} (1, 2, 3) but I can not figure out why code like
#!/usr/bin/env perl
use strict;...
Incredulity asked 2/1, 2012 at 18:19
2
Solved
I have stumbled across this sintax while reviewing a code in Ruby. The code is:
if __FILE__ == $PROGRAM_NAME
#some code...
end
I suppose __FILE__ is a variable that gets me the name of th...
Ex asked 8/5, 2016 at 14:53
2
Solved
I am wondering about how I can do in Perl what I commonly do in lisp:
(defvar *verbose-level* 0)
(defun my-function (... &key ((:verbose-level *verbose-level*) *verbose-level*) ...) ...)
thi...
Fancied asked 20/6, 2013 at 15:48
1
Solved
The documentation for Perl's close states that $. isn't reset if you use the implicit close done by open. I was trying to see exactly what this meant, but couldn't get it to happen. Here's my scrip...
Mitziemitzl asked 25/1, 2013 at 0:39
3
Solved
I want to know the meaning of perl special variables $-[0] and $+[0]
I have googled and found that $- represent number of lines left on the page and $+ represent the last bracket matched by the la...
Tina asked 25/6, 2012 at 9:48
2
Solved
Perl has quite a few special variables such as @F, $!, %! ... etc. Where are all Perl's special variables documented?
Gargantuan asked 5/4, 2010 at 13:44
1
© 2022 - 2024 — McMap. All rights reserved.