Good day,
is there any way to store the name of a constant (not the value) in a variable and access the value of this constant through the variable?
For example, if I had a constant named FOO.
my $var = 'FOO'; # FOO contains "bar"
print $var; # should print "bar", prints "FOO"
I know...
Hello,
I want to count underscores in a string. I already found a solution:
$underscore_count = ($string =~ tr/_//);
This works fine, but I would like to count only underscores which are not preceded by a backslash. So, for example, in the string "foo_bar_bar\_foo" $underscore_count would be...
Hi there,
I would like to connect my Windows 98 SE workstation over an ethernet network to my Linux router but the ethernet card in my Windows workstation never gets an IP address assigned. Not if I assign it on my own directly, nor if I specify to get an IP address automaticaly from the...
Hello there,
I have a hash of arrays so that I can get my values like this:
my $array_value = $hash{'key'}[0];
My question: How can I find out how many elements the array has? Usually I do this with scalar():
my $size_of_array = scalar(@array);
But this one doesn't work:
my $size_of_array =...
Hi there,
I'm searching for information about the select()-funktion in perl for weeks but I couldn't find anything except the manpage but there is really not enough information about select().
My question is: How can I find out if I can read from a filehandle or a socket wich select()...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.