is this what you are trying to do???
open(F, "weapons.txt");
while(<F>)
{
chop;
@weapons = <F>;
}
close(F);
$count_weapons = @weapons;
$string=join("<BR>",@weapons);
print $string;
Thank you very much mubman. That definitely did work. The funny part is that I actually tried that, but I reversed the 2>&1 and |, which I didn't realize was wrong. Thank you!! :-)
If I understand the other part correctly, then you are just trying to sort a bunch of data in chronological order which is stored in two corresponding arrays: dates and data for that date. If I understood that correctly, then you can just do any kind of sort on the dates array, after converting...
($crt_min,$crt_hour,$crt_day,$crt_month,$crt_year)=(localtime)[1..5];
then you can just format it anyway you please :-)
to sort the dates, I am sure there is a module that would let you compare two dates, but I really don't know what it would be.
The way I would approach the...
is it plausible that the "at" command actually calls on something else which eventually prints the final verifications?.. hmmm.. how would I be able to go around that and get the output?
I am having trouble piping the output of the "at" command to my program.
it seems that it would work just like any function, but for some reason it does not output the info to STDOUT.
ie.
this works well..
##################
open(ATQ, "atq|");
while(<ATQ>)
{
print $_;
}...
yeah, no problem :-)
it was pretty much nothing actually. The only thing I had to do was to set the effective user($>) and the real user($<) variables to the desired UID and would run that process as that user.
For some reason I thought it was more complicated than that. I was looking for...
I am in the process of making a web-based mail autoresponder for a network with more than 400 users. Since it is a security risk to run the actual server as a root, I decided to submit the requests to a specific folder, and have a cron running every 5 minutes or so to execute the requests. The...
I don't know, but, personally, to use a whole module just to do something simple, in terms of efficiency, is not really my preference =)...
something like:
if(length($min)==1) { $min="0".$min;}
would work just well...
just a suggestion :-)
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.