Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Re: Re: Another Array Problem.

by Juerd (Abbot)
on Dec 19, 2001 at 20:49 UTC ( [id://133163]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      foreach($_){
    
  2. or download this
       my ($num,$date,$time,$fw,$type,$action,$alert,$int,$dir,$proto,$src
    +,$dst,$service,$sport,$len,$rule) = (split /;/,$_);
    
  3. or download this
       my (undef, undef, undef, undef, undef, undef, undef, undef, undef, 
    +undef, undef, $dst, $service, undef, undef, undef) = split /;/; # spl
    +it() works on $_ if only one argument is given.
    
  4. or download this
       my ($dst, $service) = (split /;/)[11, 12];
    
  5. or download this
        %hash = (dest => $dst, service => $service); 
        foreach my $key (keys %hash){
    ...
        $count{$val}++;
        } #close foreach
    } #close while
    
  6. or download this
        $count{$_}++ for $dst, $service;
    }
    
  7. or download this
    foreach my $key1 (keys %count){
      print "$key1 appears $count{$key1} times\n"; 
    } #close foreach
    
  8. or download this
    print map "$_ appears $count{$_} times\n", keys %count;
    
  9. or download this
    #!/usr/bin/perl -w
    use strict; 
    ...
    }
    
    print map "$_ appears $count{$_} times\n", keys %count;
    
  10. or download this
    2;0 juerd@ouranos:~$ perl -e'undef christmas'
    Segmentation fault
    2;139 juerd@ouranos:~$
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://133163]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2024-04-23 13:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found