05-05-2005
Quote:
Originally Posted by Perderabo
We really need a clarification of terms here. The OP asked about virus attacks. I don't mean to sound pedantic, but the Morris worm was a worm, not a virus. The destinction is important since Unix does enjoy some immunity from classical virus attacks, not malware in general.
On the other hand, language has evolved and "virus" is now often used to mean any malware. I would not be pleased if my virus scanner intentionally ignored a trojan horse. Also some modern malware does not fit comfortably in one of the traditional categories.
So what do we mean by "virus" in this thread?
Very true, for example would the original poster consider
this to be a virus?
8 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i posted a reply the other day and needed an answer to this question while i was clarifyiing a few matter.. "how to compare to date variable in string format without having to compare word for word"..
my reply was to try to use awk to compare the strings.. I wasn't quite sure if i remembered how... (2 Replies)
Discussion started by: moxxx68
2 Replies
2. UNIX for Dummies Questions & Answers
I have three computers A, B and C. To login to B and C I should use A because it has a SSH key. I don't have any other way of accessing these two computers. Now, if I need to transfer a file between B and C, I am unable to find a way that would work... because I don't know how to authenticate... (1 Reply)
Discussion started by: Legend986
1 Replies
3. Programming
Hi,
I am trying to reverse a string using the following program utilizing the Exclusive OR bit operation:
int main() {
char str = "Quraish";
char *p = str, temp;
char *q = str + strlen(str) - 1;
while ( p != q ) {
if (*p != *q) {
*p ^= *q; *q ^= *p; *p ^= *q;... (1 Reply)
Discussion started by: royalibrahim
1 Replies
4. UNIX for Dummies Questions & Answers
Hi Gurus,
I am new to UNIX environment. We have our DataStage tool installed on UNIX box.We have Dev,test and Prod environments.The architecrue is as given below.
Now my problem is I am not able to know what is meant by Physical name,Logical name,Cluster etc. also we need to do failover in case a... (5 Replies)
Discussion started by: pratyusha
5 Replies
5. Shell Programming and Scripting
Hi,
What is the difference in the following two awk one-liners?
awk -F, '{s++} END {if (s == 1 && $4 > "09:10:00") {print $2, $4}}' f1
awk -F, '{s++} s == 1 && $4 > "09:10:00" {print $2, $4}' f1
Even though, all the 2nd column values have duplicate records, the first code does not give any... (4 Replies)
Discussion started by: royalibrahim
4 Replies
6. Programming
Hi,
In the below C code,
#include <stdio.h>
void print() {
printf("Hello\n");
}
int main() {
void (*f)() = (void (*)()) print;
f();
(*f)();
}
I wonder, how the syntaxes "f()" and "(*f)()" are treated as same without any error? Is this an improvement or ANSI/ISO... (1 Reply)
Discussion started by: royalibrahim
1 Replies
7. UNIX for Dummies Questions & Answers
I want to know the memory capacity and types of memories, processor and more...
What kind of aplications this OS attends?
Archicture/system classification (Hybrid, monolithic, multitasking, micro-kernel, layered, Another..?
Explain it to me... I really need to understand and know that.
Any... (3 Replies)
Discussion started by: AlissonManson
3 Replies
8. What is on Your Mind?
I have added a new experimental "Computer Science and Mathematics Trivia - True or False" section in the discussions, currently under the tags box.
In the future, I plan to
Expand this feature to add more trivia categories from math, science and technology.
Keep track of correct and... (20 Replies)
Discussion started by: Neo
20 Replies
LEARN ABOUT DEBIAN
moosex::attributehelpers::methodprovider::list
MooseX::AttributeHelpers::MethodProvider::List(3pm) User Contributed Perl Documentation MooseX::AttributeHelpers::MethodProvider::List(3pm)
NAME
MooseX::AttributeHelpers::MethodProvider::List - method generator for MooseX::AttributeHelpers::Collection::List
SYNOPSIS
package Stuff;
use Moose;
use MooseX::AttributeHelpers;
has 'options' => (
metaclass => 'Collection::List',
is => 'rw',
isa => 'ArrayRef[Str]',
default => sub { [] },
auto_deref => 1,
provides => {
elements => 'all_options',
map => 'map_options',
grep => 'filter_options',
find => 'find_option',
first => 'first_option',
last => 'last_option',
get => 'get_option',
join => 'join_options',
count => 'count_options',
empty => 'do_i_have_options',
sort => 'sorted_options',
}
);
no Moose;
1;
DESCRIPTION
This is a role which provides the method generators for MooseX::AttributeHelpers::Collection::List.
METHODS
meta
PROVIDED METHODS
count
Returns the number of elements in the list.
$stuff = Stuff->new;
$stuff->options(["foo", "bar", "baz", "boo"]);
my $count = $stuff->count_options;
print "$count
"; # prints 4
empty
If the list is populated, returns true. Otherwise, returns false.
$stuff->do_i_have_options ? print "Good boy.
" : die "No options!
" ;
find
This method accepts a subroutine reference as its argument. That sub will receive each element of the list in turn. If it returns true
for an element, that element will be returned by the "find" method.
my $found = $stuff->find_option( sub { $_[0] =~ /^b/ } );
print "$found
"; # prints "bar"
grep
This method accepts a subroutine reference as its argument. This method returns every element for which that subroutine reference
returns a true value.
my @found = $stuff->filter_options( sub { $_[0] =~ /^b/ } );
print "@found
"; # prints "bar baz boo"
map This method accepts a subroutine reference as its argument. The subroutine will be executed for each element of the list. It is
expected to return a modified version of that element. The return value of the method is a list of the modified options.
my @mod_options = $stuff->map_options( sub { $_[0] . "-tag" } );
print "@mod_options
"; # prints "foo-tag bar-tag baz-tag boo-tag"
sort
Sorts and returns the elements of the list.
You can provide an optional subroutine reference to sort with (as you can with the core "sort" function). However, instead of using $a
and $b, you will need to use $_[0] and $_[1] instead.
# ascending ASCIIbetical
my @sorted = $stuff->sort_options();
# Descending alphabetical order
my @sorted_options = $stuff->sort_options( sub { lc $_[1] cmp lc $_[0] } );
print "@sorted_options
"; # prints "foo boo baz bar"
elements
Returns all of the elements of the list
my @option = $stuff->all_options;
print "@options
"; # prints "foo bar baz boo"
join
Joins every element of the list using the separator given as argument.
my $joined = $stuff->join_options( ':' );
print "$joined
"; # prints "foo:bar:baz:boo"
get Returns an element of the list by its index.
my $option = $stuff->get_option(1);
print "$option
"; # prints "bar"
first
Returns the first element of the list.
my $first = $stuff->first_option;
print "$first
"; # prints "foo"
last
Returns the last element of the list.
my $last = $stuff->last_option;
print "$last
"; # prints "boo"
BUGS
All complex software has bugs lurking in it, and this module is no exception. If you find a bug please either email me, or add the bug to
cpan-RT.
AUTHOR
Stevan Little <stevan@iinteractive.com>
COPYRIGHT AND LICENSE
Copyright 2007-2009 by Infinity Interactive, Inc.
<http://www.iinteractive.com>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.10.1 2010-01-02 MooseX::AttributeHelpers::MethodProvider::List(3pm)