Posts
 
Reputation
Joined
Last Seen
Ranked #1K
Strength to Increase Rep
+5
Strength to Decrease Rep
-1
100% Quality Score
Upvotes Received
5
Posts with Upvotes
5
Upvoting Members
2
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
2 Commented Posts
~8K People Reached
Favorite Tags
Member Avatar for hmbird

By saying site1, site4 i assume you mean all of their values like: site1: A N N A G N site4: G G G N C C But could you please elaborate how exactly you get this result?

Member Avatar for hmbird
0
179
Member Avatar for replic

Hello everyone, i am fairly new to shell scripting so please bear with me. The following script is supposed to read words from a file and depending on the word print different things. However it always prints the default value. It also refuses to work completely if the first line …

Member Avatar for replic
0
333
Member Avatar for Aditya_MUHAHA

I just tested this on Windows and the replacement works without a problem. However not escaping the ''s when using '"' seems to cause a lot of problems. Try escaping all your ''s.

Member Avatar for 2teez
0
199
Member Avatar for samsons17

It looks like you just need someone to write a script for you. Otherwise you would have presented your attempt to solve this problem. IIRC daniweb is not here to do your homework or normal work for you. In other words: Present some code or go pay someone to do …

Member Avatar for replic
0
182
Member Avatar for algo_man

[CODE]$s =~ s/{{.+}}//sg; # removes everything $s =~ s/({{|}})//sg; # just removes the tags[/CODE] Seems to be working fine for me unless you meant something different.

Member Avatar for 2teez
0
167
Member Avatar for MCLASS80

Something like this? use strict; use warnings "all"; my @ip; open my $IN, "<csv.txt" or die "cannot open file to read.\n"; while(<$IN>) { @ip = split(",", $_); } close $IN; foreach(@ip) { print "$_\n"; } We read the data from a file and then loop through it.

Member Avatar for 2teez
0
331
Member Avatar for perly

If you only want to put the content of all those files into one i'd do that as follows: use strict; use warnings "all"; my @files = qw(Seq1.txt Seq2.txt Seq3.txt); open my $out, ">>output.txt" or die "Cannot open output.txt\n"; foreach my $file (@files) { open my $in, "<$file" or die …

Member Avatar for perly
0
1K
Member Avatar for Cupidvogel

My best guess is the filehandle holds all the data that has been read until you write. Looks like you might have to either find a different way or just read it in first and the write it again. EDIT: after looking around for a bit it seems to be …

Member Avatar for FelineHazard
0
167
Member Avatar for abulut

I just tested your script under Win7x64 and it only produces the headers (BSC BCF DATE TIME SAHA ALARM) but nothing else. Instead of chasing down some obscure bug related to the windows OS it should be faster to just run this under Linux/some sort of VM, as the script …

Member Avatar for d5e5
0
206
Member Avatar for marComm

The way i see it the code that sends out the mail is already there (line 81-105). You also have all the values since they are read in the beginning (line 33-45). So you could write a function that contains the mail code and then just pass the parameters to …

Member Avatar for marComm
0
572
Member Avatar for Cupidvogel

Here's what i found regarding this topic. Maybe it can help you out. use strict; use warnings "all"; open my $IN, "<in.txt" or die "cannot open file.\n"; my $timer = 0; my $_loc = -s $IN; seek($IN, $_loc, 0); while(1) { if($timer >= 25) { die "No new lines added …

Member Avatar for replic
0
129
Member Avatar for realoneomer

It would be nice if you post some code so we can help you with any problems you ran into. Did you try to just read in the files split them and then compare them?

Member Avatar for naieev
0
463
Member Avatar for erogol
Member Avatar for d5e5
0
153
Member Avatar for erogol

Something like this? {M,N} Denotes the minimum M and the maximum N match count. [code] $string1 = "Hello World\n"; if ($string1 =~ m/l{1,2}/) { print "There exists a substring with at least 1"; print "and at most 2 l's in $string1\n"; } [/code]

Member Avatar for replic
0
81
Member Avatar for replic

Hello everyone, assuming i want to write some values into my database of choice i found two ways to do this. [CODE] my $sql = "INSERT INTO table (foo, bar, foobar) VALUES (?, ?, ?)"; my $sth = $dbh->prepare($sql); foreach(sort keys %hash) { $sth->execute($_, $hash{$_}, $some_other_value); } [/CODE] as opposed …

Member Avatar for replic
0
1K
Member Avatar for j111c222

You want something like this? [CODE="Perl"] my @a = split(/\s/, $str); say "$a[0]$a[1]$a[2]"; [/CODE]

Member Avatar for erezschatz
1
165
Member Avatar for fredfletcher

you need to use "my" when you first declare a variable and use strict :) EDIT: oh nvm i was too late^^"

Member Avatar for fredfletcher
0
177
Member Avatar for aianne

"There is an error" or "it does not work" are not very accurate descriptions of a problem. Try to explain the problem so people can help you.

Member Avatar for tetron
0
238
Member Avatar for D4n1sD

I can recommend SFML it's fairly easy to use and has lots of tutorials. [url]http://www.sfml-dev.org/[/url]

Member Avatar for CodyOebel
0
123
Member Avatar for replic

Hey everyone, i've been trying to send some words seperated by spaces to a server and only the first word arrives. The connection stuff is all fine but i have absolutely no idea whatsoever how to make it send more than one word at once. This is what i'm talking …

Member Avatar for Salem
0
730
Member Avatar for replic

Hi everyone, as said in the title i have a _very_ basic IRC bot that keeps disconnecting after a few seconds. This is what i have so far and i'm grateful for every hint you might have. I also checked this thread but it did not really help: [url]http://www.daniweb.com/forums/thread243489.html[/url] [code] …

0
92
Member Avatar for replic

hi everyone, how can i react on a plugged in usb drive? (e.g. show a messagebox or whatever when a usb drive is plugged in) The whole thing needs to run under windows only (xp and maybe vista)

Member Avatar for William Hemsworth
0
78
Member Avatar for replic

Hi everyone, i wrote this small app and it works fine but it erases everything up to the offset and everything after it. Anyone knows how to avoid that? [CODE=C++]#include <iostream> #include <fstream> int main() { int hex = 0x75; std::ofstream f("sample.exe", std::ios::binary); f.seekp(1169, std::ios::beg); f.write(reinterpret_cast<const char *>(&hex), 2); f.close(); …

Member Avatar for replic
0
235
Member Avatar for disc

Watch out for more entries that say Version in your *.rc file and change them all to the Version you want. That works for VC++ 6 maybe it still works in the newer versions.

Member Avatar for replic
0
85
Member Avatar for replic

Hi everyone, as the heading already says i want to check whether a folder is a network share or not. So far i tried to achieve this by reading the file attributes but that did not lead to the right solution. If anyone here knows how to do this please …

Member Avatar for replic
0
442