/etc/fstab is the file system table, there needs to be an entry in it for every device you wish to mount under the root file system.
/etc/mtab is the mount table. As devices are mounted, the mtab file gets modified by your lovely linux system and provides a running commentary on what is going...
Perl knows which line endings go with which OS so if, in Windows you open a unix file and chomp each line then print each line with "\n", then perl will know to put "\r\n" 'cos you're on Windows. It works the other way round as well.
If you just want to read a *nix file in Windows then use...
How about something like this;
while(<DATA>) { #data is: f 2//3 4//5 6//7
@line = split; # split all on whitespace
shift(@line); # Get rid of the f
foreach (@line) {
($vert1,$vert2) = split(/\/\//);
$hash{$vert1} = $vert2;
}
Now you have a hash of...
How about something like this;
while(<DATA>) { #data is: f 2//3 4//5 6//7
@line = split; # split all on whitespace
shift(@line); # Get rid of the f
($vert1, $vert2) = map {split(/\/\//)} @line;
$hash{$vert1} = $vert2;
}
Now you have a hash of vertex => normalvertex...
Yup, I believe it's something like that :-))
Seriously though if there is sxomething out there I can use without offending the tax return officer and thence the late payments officer I would be ever so grateful.
A bit OT perhaps but does anyone know of a suitable program for linux that will help me work out my tax so I can fill in my tax return.
thanks,
greadey
Isn't this something to do with the way you are opening the file, as in clobbering existing content ready for rewriting.
You have used;
open(FILE, ">$file");
IF you want to update without erasing it first try;
open(FILE, "+>$file");
Have a good look at perlopen.
Hi all,
Does anyone know what code is to be used to write to a bookmark in Word with perl?
I've tried the following;
#Code opens word and makes it visible
$doc = $word->ActiveDocument;
$sel = $doc->bookmarks("bk1")->Select;
$doc->$sel->InsertAfer("here is some text");
perl seems to be...
You can always try and use the sub as a "normal" one using this syntax;
$canvas->bind($id, '<ButtonRelease-2>' => sub {netscape($org,$call_subject,$B_hits[$m]{qstart}, etc.)});
Course the other problem maybe that you're not dereferencing your arguments within the netscape function perhaps.
Well your right, you should learn to love reading - especially about perl. Perl documentation is second to none and perl books are not only technically superb, but an excellent source of humour as well.
Thanks for everyone's reply. I ought to let you know that the machine in question is running debian woody and is standalone with intermittent dial up access.
I was made redundant in march and of course had my Cv posted all over the place. Since then I have been getting 150 - 200 spams a day...
Hi all,
I've recently been getting returned emails that were never sent by me conciously in the first place.
Is this a sign of infection by e.g worm or is there another more likely scenario.
Thanks,
greadey.
you could do something like this;
my %hash; my $key; my $value;
open(F, $file);
while(<F>) {
($key, $value) = split(/\s=\s/);
$hash{$key} = $value;
}
then you can do things like;
$hash{'count'}++;
$hash{'usability'}--;
print "count = " . $hash{'count'};
Hi all,
I've downloaded a module to drive a LabJack data acquisition device. After the usual perl Makefile.PL the next commands are make; make install. How do I get round this on a windows 2000 box? The module is definitely a windows module (the presence of *.dll files seems to give that one...
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.