04-30-2010
Rock and Roll!!!
Thanks tukuyomi!
Bub
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello guys,
I have in PERL an associative 2-dimensional array, called matrix. The array (actually the matrix) is made up like this
matrix = x;
matrix = y;
matrix = w;
matrix = z;
...
but the names a, b, c, d are set just at runtime.
The question is: how can i get all the keys of... (2 Replies)
Discussion started by: foo.bar
2 Replies
2. Shell Programming and Scripting
Hi Guys,
I have an array which has numbers including blanks as follows:
1
26
66
4.77
-0.58
88
99
11
12
333
I want to print a group of three elements as a different column in a file as follows:(including blanks where there is missing elements) for.e.g. array element #7... (4 Replies)
Discussion started by: npatwardhan
4 Replies
3. Shell Programming and Scripting
I have the following code:
print @testarray;
which returns:
8
8
8
9
How do I return the array like this:
The output is: 8, 8, 8, 9 (5 Replies)
Discussion started by: streetfighter2
5 Replies
4. UNIX for Dummies Questions & Answers
I'm trying to create a Matrix using bash. The expected output is
.AB CDE FG
1
2
3
4
5
6
7
I'm a newbie in shell language, really appreciate if there is anyone who can guide me with this.
Double post again, continued here (0 Replies)
Discussion started by: vinzping
0 Replies
5. Shell Programming and Scripting
I have a file like this:
ASSPASVFETQY,hTRBV12-4,hTRBJ2-5,2
ASSPASTGGDYGYT,hTRBV18,hTRBJ1-2,2
ASSPASGDGYT,hTRBV5-1,hTRBJ1-2,2
ASSPASFPEDTQY,hTRBV27,hTRBJ2-3,2
ASSPARVNYGYT,hTRBV5-1,hTRBJ1-2,2
ASSPARTSGGLNEQF,hTRBV6-4,hTRBJ2-1,2
ASSPARQSYNEQF,hTRBV11-1,hTRBJ2-1,2... (3 Replies)
Discussion started by: xshang
3 Replies
6. Shell Programming and Scripting
Hi all,
I been looking for a solution to the fact that when I use:
for (i=1; i<=NF; i++) print $ifields that are originally in a single line are printed in a single line
I have severals files for which the first 7 are the same, but the number of variables after that can vary, for example NF... (5 Replies)
Discussion started by: PaulaL
5 Replies
7. Shell Programming and Scripting
Hey Masters,
Here is my input:
fragmentID chromosome start end HEL25E TRIP1
r5GATC2L00037 chr2L 5301 6026 0.03 0.036
r5GATC2L00038 chr2L 6023 6882 -0.025 -0.041
r5GATC2L00040 chr2R 6921 7695 -0.031 0.005
r5GATC2L00042 chr2R 7715 8554 -0.006 -0.024
r5GATC2L00043 chr3L 8551 8798 0.042 0... (4 Replies)
Discussion started by: @man
4 Replies
8. Shell Programming and Scripting
First of I would just like to state that I am not looking for you guys to just do my work for me, I do want to learn and actually understand everything that is happening.
Hey all, I am having trouble on this. What I need to do is... Write an executable C file that will take a text file (not a... (8 Replies)
Discussion started by: innvert
8 Replies
9. UNIX for Beginners Questions & Answers
#!/bin/bash
PH=(AD QD QC 5H 6C 8C 7D JH 3H 3S)
echo ${PH}
In the above array, how can I print to screen just the first 8 elements of ${PH} and have the last 2 elements print just below the first line starting underneath AD?
I need to do this in order to save terminal window spacing... (5 Replies)
Discussion started by: cogiz
5 Replies
10. Shell Programming and Scripting
I use the following script to print the sum and how could I extend this to print medians instead? thanks
name s1 s2 s3 s4
g1 2 8 6 5
g1 5 7 9 9
g1 6 7 8 9
g2 8 8 8 8
g2 7 7 7 7
g2 10 10 10 10
g3 3 12 1 24
g3 5 5 24 48
g3 12 3 12 12
g3 2 3 3 3
output
name s1 s2 s3 s4
g1 5 7 8 9... (5 Replies)
Discussion started by: quincyjones
5 Replies
LEARN ABOUT DEBIAN
moosex::multimethods
MooseX::MultiMethods(3pm) User Contributed Perl Documentation MooseX::MultiMethods(3pm)
NAME
MooseX::MultiMethods - Multi Method Dispatch based on Moose type constraints
VERSION
version 0.10
SYNOPSIS
package Paper; use Moose;
package Scissors; use Moose;
package Rock; use Moose;
package Lizard; use Moose;
package Spock; use Moose;
package Game;
use Moose;
use MooseX::MultiMethods;
multi method play (Paper $x, Rock $y) { 1 }
multi method play (Paper $x, Spock $y) { 1 }
multi method play (Scissors $x, Paper $y) { 1 }
multi method play (Scissors $x, Lizard $y) { 1 }
multi method play (Rock $x, Scissors $y) { 1 }
multi method play (Rock $x, Lizard $y) { 1 }
multi method play (Lizard $x, Paper $y) { 1 }
multi method play (Lizard $x, Spock $y) { 1 }
multi method play (Spock $x, Rock $y) { 1 }
multi method play (Spock $x, Scissors $y) { 1 }
multi method play (Any $x, Any $y) { 0 }
my $game = Game->new;
$game->play(Paper->new, Rock->new); # 1, Paper covers Rock
$game->play(Spock->new, Paper->new); # 0, Paper disproves Spock
$game->play(Spock->new, Scissors->new); # 1, Spock smashes Scissors
DESCRIPTION
This module provides multi method dispatch based on Moose type constraints. It does so by providing a "multi" keyword that extends the
"method" keyword provided by MooseX::Method::Signatures.
When invoking a method declared as "multi" a matching variant is being searched in all the declared multi variants based on the passed
parameters and the declared type constraints. If a variant has been found, it will be invoked. If no variant could be found, an exception
will be thrown.
AUTHOR
Florian Ragwitz <rafl@debian.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2010 by Florian Ragwitz.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
perl v5.10.1 2010-01-03 MooseX::MultiMethods(3pm)