Additions:
Additions:
Proper way to do a for loop
Do not ask me why though ...
for (; $i < $arraySize ; $i ) {
Additions:
Additions:
print color("yellow"), "Danger, Will Robinson!\n", color("reset");
print color("green"), "Danger, Will Robinson!\n", color("reset");
print color("blue"), "Danger, Will Robinson!\n", color("reset");
Additions:
use Term::ANSIColor;
print color("red"), "Danger, Will Robinson!\n", color("reset");
Deletions:
use Term::ANSIColor;
print color("red"), "Danger, Will Robinson!\n", color("reset");
Additions:
No differences.
Additions:
Pass array to sub-routines
Normally it is not possible to pass array to sub routines.
The only way to do so is to pass a reference to the array when calling the sub-routine and then to use it in the sub-routine
WriteChangesTofile($new_configuration_file,\@changed_file);
sub
WriteChangesTofile{
# Does not return anything. It OVERwrites the file
my $new_configuration_file=$_[0];
my @changed_file = @{$_[1]}; # This is the way to handle array passed to sub-routines. The array is passed as a reference
print "Updating: ".$new_configuration_file."\n";
open(NEW_CONF_FILE,">$new_configuration_file");
print (NEW_CONF_FILE @changed_file);
close(NEW_CONF_FILE);
}
Additions:
$size = (-s 'ddserver.log');
print $size;
Deletions:
$size = (-s 'ddserver.log');
print $size;
Additions:
Additions:
String comparison
if ($ticketList ne )
ne: non equal
eq: equal
Additions:
Additions:
Deletions:
How to run a bash command in a Perl program:
Additions:
system("myCommand"); i.e.: system("/bin/ls");
Deletions:
exec("myCommand"); i.e.: exec("/bin/ls");
Additions:
Additions:
CPAN install module: to install a module
How to run a bash command in a Perl program:
exec("myCommand"); i.e.: exec("/bin/ls");
Deletions:
CPAN install module to install
Additions:
CPAN install module to install
How to use CPAN?