Help! (what a classic)...concatenation operator on drugz?!?
- Hello everyone,
I am attempting to write a PERL script to automate the setup of SBC
(Single Board Computers). Part of this script initializes the flash RAM
(using mknod and sfdisk). Configuration parameters such as the device name
(/dev/hrfd) and the Major nummber (for mknod) are stored in a configuration
file. Okay..to up to now, this is not too complicated...here is the weird
part...and hoping someone has heard of this:
- The script must also create the device /dev/hrfd1. Since /dev/hrfd
is a variable read from the configuration file, I "simply" concatenate the
variable contaning /etc/hrfd with "1". For some completely unknown reason,
the concatenation screws up completely and adds the "1" at the begining of
the variable giving 1dev/hrfd as I print out the resulting variable.
Moreover, I also print "Removing $Prm"...and this is the really freaky part,
the "1" which should have been concatenated to the $Prm (/dev/hrfd) ends up
replacing the first caracter of the printed string rendering "1emonving
/dev/hrfd" on the display.
- At this point, I am not too certain what information is really
relevant to my problem but here are some of the information relevant to the
OS: Mandrake 7.1
Perl -V: 2.2.15-0.16mdksmp (rpm from mandrake 7.1 CD)...perl version
Hardware: Pentium 75, 32MB RAM
Note that I have also experienced this problem on the same machine
with Mandrake 8.0Beta1.
The reason why I regressed to Mandrake 7.1 is that my script runs
correctly on my coworker's machine which is runing Mandrake 7.1. Having
formatted and reinstalled Mandrake, I can pretty much eliminate library
I have attached the scipt to this e-mail as well as the relevent
configuration file. Note that the configuration file must be in a directory
named config relative to the script's path.
Please bare in mind that I am pretty much inexperienced in Perl am I
begg you all to excuse me for the most-probably-mediocre quality of my
Thanks a millon,