Well, if I try this, it print's 'bar'. But in your example 'bar' is the name of the constant and I need the value.
constant ANSWER => 42; # some constant
$name_of_constant = 'ANSWER'; # $name_of_constant contains 'ANSWER', not '42'
print magic($name_of_constant); # prints magically...
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...
Thank you very much for your answer but it doesn't help. It is important to count only the underscores with no backslash in front of it.
I'm writing a chat program and everything between two underscores is printed bold. But if the user supplies only one underscore the whole chat output would be...
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...
If your ethernet card ist detected correctly and you are just getting no IP, it is not the same problem. My problem was, that Windows could not detect the ethernet card without these mainboard drivers. After I installed the drivers, Windows detected the card and I got an IP address and...
Finally it works.
I installed some drivers for my mainboard, among others one called "IRQ Routing Driver", and now now everything works perfectly.
Thanks again for the help,
bye.
The board is a K6BV3+ with an Award BIOS and if I understand it right it's only possible to assign an IRQ to ISA or to PCI and to assign an IRQ to a PCI slot. But it looks to me like Windows doesn't care about these settings.
Yes, it's a RealTek RTL8029 for sure and I use the latest drivers from the RealTek website.
I just played a few hours around with removing cards and putting them back in and so on. Once I got it and Windows really saw the NIC after I told Windows in Safe Mode the right IRQ. The network worked...
There seems to be no way to tell Windows which IRQ the soundcard is using but I gave the PCI slot of the soundcard the right IRQ so everything in the device manager is all right now and there are no conflicts. It even looks like Windows doesn't freeze anymore while it's booting.
But there is...
I thank you all so much for your help but it doesn't work.
I just tried to remove the NIC from the device manager and let Windows redetect it - with no effect. So I removed the NIC from the computer, reinstalled Windows without the NIC and build it in again. Always the same.
But I have another...
Why could Windows not store my changes in the registry if it is on the same computer as a Linux installtion? It doesn't even know that there's Linux on another partition.
I have a boot manager (lilo) installed, so I can decide on each boot process which OS I want to start.
Since the ethernet...
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.