Re: im a beginner using perl
Check out Mail::Sendmail at http://search.cpan.org/search?mode=modulequery=mail%3A%3Asendmail * Wood, Richard ([EMAIL PROTECTED]) spake thusly: All, This is part of what I have, if the service is not equal to 1, how would I issue a command to email someone? Can not find this in the literature. Check certain ARS stuff #1) Check for the availability of telalert $telalertcheck=`ps -ef | grep telalertd | grep -v grep`; $telreturn=$?; logmesg($telreturn,Urgent telalertd process (on $host) indicates the process is down); ##2) check other ars process if (telreturn != 1) { } elsif (telreturn == 1) { Thanks, Richard -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- ) ,_),_) (-(__ |_ _ _ |/ ) | |(_)(_ |\ ( \_, ___ | http://www.exitwound.org: hard to find| | http://www.buckowensfan.com : he's the man| ___ | Keep your boss's boss off your boss's back. | ___ -BEGIN GEEK CODE BLOCK- | Version: 3.1 | | GJ/IT d- s: a C+++$ UL P+++ L+++ E--- W++| | N+@ o K- w O- M- V PS+ PE Y+ PGP++ t+@ 5@ X++ | | R tv+@ b+ DI D+ G++ e h r+++ y+++ | --END GEEK CODE BLOCK-- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: can't write to a file in Linux, can in Unix....?
* Brian Volk ([EMAIL PROTECTED]) spake thusly: Hello, hello. #!/bin/perl ^ \___ there should be no leading space. #! should be the first 2 characters on the line. this is likely the cause of ./script.pl not working for you. $datafile = /files/perl/test.txt; $resultfile = /files/perl/outfile.txt; # Note the '' charater. open(DATAFILE, $datafile); open(DATAFILE, $datafile) || die could not open $datafile: $!; open(OUTPUTFILE, $resultfile); open(DATAFILE, $resultfile) || die could not open $resultfile: $!; by adding the die condition, you should get an error message telling you what the problem is. my immediate suspicion is that /files/perl/test.txt doesn't exist (unless you created it, it doesn't - RedHat has no /files directory on a standard installation). -- ) ,_),_) (-(__ |_ _ _ |/ ) | |(_)(_ |\ ( \_, ___ | http://www.exitwound.org: hard to find| | http://www.buckowensfan.com : he's the man| ___ | If God didn't mean for us to juggle, tennis | | balls wouldn't come three to a can. | ___ -BEGIN GEEK CODE BLOCK- | Version: 3.1 | | GJ/IT d- s: a C+++$ UL P+++ L+++ E--- W++| | N+@ o K- w O- M- V PS+ PE Y+ PGP++ t+@ 5@ X++ | | R tv+@ b+ DI D+ G++ e h r+++ y+++ | --END GEEK CODE BLOCK-- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: add text to the end of a word. HELP!!
$name = $name . \@minime.com; * Peter Lemus ([EMAIL PROTECTED]) spake thusly: Hi I need to add a word to the end of a word inside a file. HELP PLEASE for example: I will read a file with these names july tony richard then I want to add the following to the name @minime.com. So it will look like [EMAIL PROTECTED] = Peter Lemus UNIX/NT Networks Engineer [EMAIL PROTECTED] --The universe is way too big for us to be alone; the real question is; who is out-there, besides us humans? --A wise man will be master of his mind, a fool will be its slave. Dr.David Schwartz. --Enjoy every moment of the day; Live like as if today was your last day alive, and perhaps, it might be. __ Do You Yahoo!? Send your FREE holiday greetings online! http://greetings.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- ) ,_),_) (-(__ |_ _ _ |/ ) | |(_)(_ |\ ( \_, ___ | http://www.exitwound.org: hard to find| | http://www.buckowensfan.com : he's the man| ___ | Winter is the season in which people try to | | keep the house as warm as it was in the | | summer, when they complained about the heat. | ___ -BEGIN GEEK CODE BLOCK- | Version: 3.1 | | GJ/IT d- s: a C+++$ UL P+++ L+++ E--- W++| | N+@ o K- w O- M- V PS+ PE Y+ PGP++ t+@ 5@ X++ | | R tv+@ b+ DI D+ G++ e h r+++ y+++ | --END GEEK CODE BLOCK-- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]