You can add an extra element on to a Perl list with push, into the middle with splice and onto the beginning with unshift.
You can extract a single element from splitting a scalar and calling up the element you want using square brackets and the appropriate subscript.
Example:
open (fh,"../../req ....
Perl is excellent "glueware" - a language which can be well used to connect together a whole lot of elements. And one of those elements may be operating system commands run from within the Perl program.
Here are (three!) ways that you can do it - in each case leaving the result of running the comm ....
When a new technology comes out, it's described as "leading edge" - it tends to be very expensive, and whilst it functions it does so with limitations that make its adoption limited - by only those people who really need the technology and / or are prepared to put up with its restrictions. When I w ....
Using vsftpd ...
Turning on manually / for current boot
1. Log is as root
2. cd /etc/init.d
3. ./vsftpd start
[trainee@melksham ~]$ su -
Password:
[root@melksham ~]# cd /etc/init.d
[root@melksham init.d]# ./vsftpd start
Starting vsftpd for vsftpd: [ OK ]
[root@me ....
During some courses, I write few (if any) new examples in front of my delegates, rather relying on the standard ones in the training notes (which I wrote anyway!) and making small changes and adjustments to illustrate how things work. On other courses, though, I write a some new examples from scrat ....
A big thanks to Bruce Williamson who held us all spellbound at yesterday's RailFuture Annual National Conference with his talk / "masterclass" on dealing with the press - something which many of "us campaigners" have learned the hard way.
Bruce has many years of experience on both sides of the micr ....
In Lua, the table.sort function allows you to sort a table and by default is sorts into the order that's given back by the < operator on each of the objects to be sorted. If you want to override this behaviour, you can pass the name of a function into Lua's sort and it will call this function eac ....
"Isn't there one standard way to say NOT?" asked one of my delegates on today's course - and it's an excellent question. But the answer to a question about a negative subject is itself in the negative - no, there isn't just a single way!
In fact .. I can think of no fewer that 12 ways!
• 1. ! ....
If you want to look something up in a book, you'll probably use the index. And so it is in Lua that if you want to look something up in a table (the collection structure in Lua), you'll use an index too.
We have just announced our Public Lua Course - it's a natural for us, as we specialise in nich ....
I used to write CAD system software (many moons ago), and when doing so I used what I call "defensive coding techniques". Which meant that I never trusted user input, that a file would be available, that I could write correctly to a device - I tested, tested and tested again. In our environment, i ....