Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
chomp
- Page 1
Chomp removing all characters in the line
Programming
Software Development
11 Years Ago
by voidyman
… @lines=<FIN>; close(FIN); foreach(@lines){ $msg=$_;
chomp
($msg); $msg=$msg.",".$datetime.",12/31/9999… $msg."\n"; } close(FOUT); If i remove the
chomp
though, it gives me the line of <FIN>…
Re: Chomp removing all characters in the line
Programming
Software Development
11 Years Ago
by 2teez
… "can't open file: $!"; while (<$fh_in>) {
chomp
; $msg .= $_ . "," . $datetime . ",12/31/9999,AUTO…
How to chomp and split properly a file
Programming
Software Development
14 Years Ago
by notuserfriendly
… so forth. Here is my implementation . i have not used
chomp
yet [CODE] #!/usr/bin/perl open (nastyfile , "file.txt…
Re: How to chomp and split properly a file
Programming
Software Development
14 Years Ago
by 7stud
…, @col2, @col3); while (<$INFILE>) { next if /^\s*$/ or /^\./;
chomp
; my @pieces = split /\s+/; push (@col1, shift @pieces) if @pieces…
Noobish
Programming
Software Development
15 Years Ago
by scuba183
…); $temp=uc(param('last')); $last=
chomp
($temp); $temp=param('area'); $areacode=
chomp
($temp); $temp=param('firstnum'); $first3=
chomp
($temp); $temp=param('secondnum'); $last4…
Failing to add header and trailer to huge file using script!
Programming
Software Development
13 Years Ago
by Sanjanapm
… cut -d '=' -f 2`;
chomp
($OutputFile_CH_Filename);
chomp
($psv_file); # Here a zero byte file…3)}\' $SRC_DIR/$psv_file | head -1`;
chomp
($start_date);
chomp
($end_date); print "Start Date : … $TGT_DIR."/"."$OutputFile_CH_Filename";
chomp
($Detail_File); #----------------- Create the Header Record …
Re: Noobish
Programming
Software Development
15 Years Ago
by scuba183
… problem in the [code=perl] $temp=uc(param('class')); $class=
chomp
($temp); [/code] part, and not regarding the param('x'); call… script so that it doesn't convert to uppercase or
chomp
, and now it's working EDIT: Well now I feel… really stupid. $first=
chomp
($temp); would return the number of spaces removed, not the…
Re: Noobish
Programming
Software Development
15 Years Ago
by KevinADC
ahh...my bad, I also missed that. You should not assign a return value from the
chomp
function, it should just be: $var = "some value\n";
chomp
($var); Note:
chomp
() only removes the input record seperator from the end of a line or string, which is generally a newline, it does not remove spaces.
Perl/CGI (Reading Data) Part II
Programming
Computer Science
19 Years Ago
by Comatose
…little. Let's do that: [CODE] if (param()) {
chomp
($fname = param('fname'));
chomp
($lname = param('lname')); &start_page; } else { &…usr/bin/perl use CGI qw(:standard); if (param()) {
chomp
($fname = param('fname'));
chomp
($lname = param('lname')); &start_page; } else { &…
Can't seem to find the problem...
Programming
Software Development
15 Years Ago
by w0h0m
… { print "\nEnter your login name: ";
chomp
($id = <STDIN>); print "\nEnter your… password: ";
chomp
($pass = <STDIN>); login($id, $pass); … msgInfo() { print "\nEnter message subject: ";
chomp
($subj = <STDIN>); print "\nEnter your …
Dynamic program in perl
Programming
Software Development
11 Years Ago
by shensteffi
…; { for($j=0;$j<=$c;$j++) {
chomp
$a[$i][$j]; print"\t$a[$i][$j]&…1;$i<=$r;$i++) { $j=0; {
chomp
$a[$i][$j]; print"\t$a[$i][$j]"…i++) { for($j=0;$j<$v;$j++) {
chomp
($b[$i][$j]); } print"\n"; } …
perl script help re: scope/structure for noob
Programming
Software Development
18 Years Ago
by scotchfx
… } else { print "\nunmatched line: $line \n";
chomp
($line); #remove empty newlines in input file } } Scheduling loop (script… } else { print "\nunmatched line: $line \n";
chomp
($line); #remove empty newlines in input file } } print "\…
How to send Attachments using perl script
Programming
Software Development
17 Years Ago
by sri2244
… (e.g 192.168.1.51): ";
chomp
($ipadr=<STDIN>); print "\nEnter From …E-Mail Id : ";
chomp
($from=<STDIN>); print "\nEnter To E…-Mail Id : ";
chomp
($to=<STDIN>); print "\nEnter the Number…(e.g.100) : ";
chomp
($n=<STDIN>); for ($k=1;$k<…
perl regular expression - search and extraction
Programming
Software Development
14 Years Ago
by perly
…quot;; while (my $line = <Dbase>){
chomp
$line; my ($key, $value) = split(/s+:s+/,… $line, 2);
chomp
$key;
chomp
$value; $key =~ /([^s]+)/; $key = $1; $value =~ /(^s+)(.+)(… \n"; $input = <STDIN>;
chomp
$input; while (defined<$line>){ foreach $k…
Re: perl regular expression - search and extraction
Programming
Software Development
14 Years Ago
by perly
…$!"; while (my $line = <Dbase>){
chomp
$line; #$line =~ m/^\s*(\S+)\s*:\s*(.*)\s…reaction name for searching:"; $input=<>;
chomp
($input); if(exists $hash{$input}) { print DATA…reaction name for searching:"; $input=<>;
chomp
($input); if(exists $hash{$input}) { print DATA…
Need help reading lists of Files and pasting columns of common files
Programming
Software Development
12 Years Ago
by newbie21
…n"; while (<DATA1>){ if ($. > 0){
chomp
; $ID1 = substr($line1, 1, 7); open (FILE, "$…n"; while (<DATA1>){ if ($. > 0){
chomp
; $ID1 = substr($line2, 1, 7); open (FILE, "…$c=$FId[3] ; } while (<DAT>){ if ($.> 0){
chomp
; @FId = split(' ', $_, -1); $d=$FId[1]; $e…
update a master file with new data from an update file
Programming
8 Years Ago
by johntm
…; my %seenmstr; my $Header_mstr = shift (@csvmaster); foreach (@csvmaster){
chomp
(@csvmaster); $_ = uc $_ ; $_ =~ s/,//g; … my %seenupdte; my $Header_updte = shift (@csvupdate); foreach (@csvupdate){
chomp
(@csvupdate); $_ = uc $_ ; $_ =~ s/,//g; #…
Re: have some problems with pattern match hope you can help!!
Programming
Software Development
16 Years Ago
by MojoS
…while (defined (my $line = <IN>)) {
chomp
($line); if ($line =~ m/^#/) {
chomp
($line); #save the unimportant interval for later on… $dna = ''; } $headline = $line; }else { # Read the DNA
chomp
$line; $dna .= $line; }while ($buffer =~ /$fragment/gi){ print $headline…
have some problems with pattern match hope you can help!!
Programming
Software Development
16 Years Ago
by MojoS
… my $comment =''; while (defined (my $line = <IN>)) {
chomp
($line); if ($line =~ m/^#/) { if ($comment ne ''){ my ($character, …$dna = '';+ } $headline = $line; } else { # Read the DNA
chomp
$line; $dna .= $line; } } ######################### Thanks alot for your time, i…
plz explain me wht does this script means.It is a perl script.
Programming
Software Development
16 Years Ago
by damanjit
…], $feeAmount[$currentFeeLine] ) = split( /,/, $line );
chomp
$feeAmount[$currentFeeLine]; if ( $feeAmount[$currentFeeLine] eq "&…, $dummy, $co_costHighAmount, $co_costAmount ) = split( /,/, $line );
chomp
$co_costAmount; if ( $co_costHighAmount eq "" ) { $co_costHighAmount …
Question on Creating Hashes
Programming
Software Development
16 Years Ago
by godevars
… OUT file: $!\n"; while (<LIST>) {
chomp
; my @alpha = split(//,$_); my @alpha = sort @…_\n"; $i++; } while (<LIST2>) {
chomp
; s/\s+//g; print OUTPUT3 "$_\n"; } …while (<LIST3>) {
chomp
; s/\s+/,/g; s/\n/,/g; s/:/,/g; print…
where would i find this information?
Programming
Software Development
15 Years Ago
by 115cruiser
… to screen, 2 to print to a file: ';
chomp
($outputOpt = <STDIN>); #
chomp
removes newline from input string print 'Search for…: ';
chomp
(my $searchPattern = <STDIN>); tie @lines, 'Tie::File', $inputFile, …
Re: Reading from a file
Programming
Software Development
15 Years Ago
by Comatose
…file."); foreach $line (<LOGFILE>) {
chomp
($line); if($line eq "Raghu") { print… die ("couldn't read: $!\n"); # Error Checking
chomp
($var); print "$var\n"; } } close(LOGFILE); … die ("couldn't read: $!\n"); # Error Checking
chomp
($var); print "$var\n"; } } close(LOGFILE);…
Another Perl Out Of Memory Post :(
Programming
Software Development
14 Years Ago
by mattdaddym
…>) { $line = $_; ($nodeid,$ext,$file) = split(/\t/, $line);
chomp
$nodeid;
chomp
$ext;
chomp
$file; ##### make sure we have a nodeID#### if( $nodeid…
Re: perl regular expression - search and extraction
Programming
Software Development
14 Years Ago
by perly
…'t open $database $!"; while (my $line = <Dbase>){
chomp
$line; $line =~ m/^\s*(\S+)\s*:\s*(.*)\s*\./; #$reacts{$1… "Enter reaction name for searching:"; $input=<>;
chomp
($input); if(exists $hash{$input}) { print DATA "$input,$hash…
Re: perl regular expression - search and extraction
Programming
Software Development
14 Years Ago
by Murtan
…'t open $database $!"; while (my $line = <Dbase>){
chomp
$line; $line =~ m/^\s*(\S+)\s*:\s*(.*)\s*\./; #$reacts{$1… "Enter reaction name for searching:"; $input=<>;
chomp
($input); if(exists $hash{$input}) { print DATA "$input,$hash…
Re: perl regular expression - search and extraction
Programming
Software Development
14 Years Ago
by perly
…'t open $database $!"; while (my $line = <Dbase>){
chomp
$line; $line =~ m/^\s*(\S+)\s*:\s*(.*)\s*\./; #$reacts{$1… "Enter reaction name for searching:"; $input=<>;
chomp
($input); if(exists $hash{$input}) { print DATA "$input,$hash…
Unexpected output
Programming
Software Development
13 Years Ago
by KAY111
…(FF,">vec2.txt"); while (<FILE>) {
chomp
($_); @arr=split("",$_); $len=@arr; for ($i…;&($arr[$i+2]==">")) { $line="";
chomp
($line); $i=$i+4; do { $line=$line.$arr[$i…++];
chomp
($line); } while (!(($arr[$i]=="<")&&($arr[$…
Parsing & Calculating
Programming
Software Development
12 Years Ago
by whoadiz
…); print "Enter output file name \n";
chomp
($output = <STDIN>);
chomp
($input = "in.txt"); open (IN, $input…); open (OUT, >"$output"); while (<IN>){
chomp
; ($ID, $A, $B) = split ("\t"); #push @_, ($DIF…
Perl write in a text file if no duplicate
Programming
Software Development
12 Years Ago
by ghosh22
…"; $input=<STDIN>; $input1=<STDIN>;
chomp
$input;
chomp
$input1; open FILE, "C:/Software/new1.txt" or… die $!; while (<FILE>) {
chomp
; ($user)=split("\s"); if ($input=~/$user/) { print "…
1
2
3
17
Next
Last
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC