Sponsored Content
Full Discussion: [Perl] Write to a file
Top Forums Shell Programming and Scripting [Perl] Write to a file Post 302848775 by Optimus81 on Friday 30th of August 2013 04:22:38 AM
Old 08-30-2013
try removing opening and closing brackets in print stmt

Code:
print "$line.......\n";

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

perl -write values in a file to @array in perl

Hi can anyone suggest me how to write a file containing values,... say 19 20 21 22 .. 40 to an array @array = (19, 20, ... 40) -- Thanks (27 Replies)
Discussion started by: meghana
27 Replies

2. Shell Programming and Scripting

perl read and write to conf file

Hi Everyone, There is a perl file: a.pl ============ #!/usr/bin/perl my $config_file = $ARGV; open CONFIG, "$config_file" or die "Program stopping, couldn't open the configuration file '$config_file'.\n"; my $config = join "", <CONFIG>; close CONFIG; eval $config; die "Couldn't... (1 Reply)
Discussion started by: jimmy_y
1 Replies

3. Shell Programming and Scripting

Extract string from a file & write to a new file (Perl)

Hi, This is the first time playing around with perl and need some help. Assuming if i have a line of text that looks like this: Date/Time=Nov 18 17:12:11;Device Name=192.168.1.1;Device IP=192.168.1.1;Device Class=IDS;Source IP=155.212.212.111;Source Name=UNKNOWN;Source Port=1679... (3 Replies)
Discussion started by: LuckyGuy
3 Replies

4. Shell Programming and Scripting

PERL write to file help

Very new to perl and have an exististing script which I need to capture some variables to a log file. My below code works well, except the @cmds array has some %20 which I need replaced with a space and some <br> which needs a \n instead. I tried messing around with a foreach, but have failed. ... (6 Replies)
Discussion started by: numele
6 Replies

5. Programming

How to write a new line to the end of the file in Perl?

i am very new to Perl. i am using Ubuntu. i have a string call $string that contains following words "new line". i also have a data file as follows. djfibjbet etitrbjijbtr rrge rgjierjegjeri jerijg kijij jijij i want to write my new line to my data file as follows. djfibjbet... (3 Replies)
Discussion started by: usustarr
3 Replies

6. Programming

how to write a sub in Perl

hi, i am a really new to Perl. i have a following code that is working well. " i know this is really simple, but i cant figure out a way to do this. can someone help me please?:( (1 Reply)
Discussion started by: usustarr
1 Replies

7. Shell Programming and Scripting

Perl extract number from file & write to file

I have 1 file that has elements as follows. Also the CVR(10) and the word "SAUCE" only appear once in the file so maybe a grep command would work? file1 CVR( 9) = 0.385E+05, ! VEHICLE CVR(10) = 0.246E+05, ! SAUCE CVR(11) = 0.162E+03, ! VEHICLE I need to extract the... (6 Replies)
Discussion started by: austinj
6 Replies

8. Shell Programming and Scripting

Perl write and read on same file

Hi, I am trying to do a write operation followed by a read operation on the same file through Perl, expecting the output produced by read to contain the new lines added, as follows: #! /usr/bin/perl -w open FH, "+< testfile" or die "$@"; print FH "New content added\n"; while (my $line =... (1 Reply)
Discussion started by: royalibrahim
1 Replies

9. Shell Programming and Scripting

Need to search a particular String form a file a write to another file using perl script

I have file which contains a huge amount of data. I need to search the pattern Message id. When that pattern is matched I need to get abcdeff0-1g6g-91g3-1z2z-2mm605m90000 to another file. Kindly provide your input. File is like below Jan 11 04:05:10 linux100 |NOTICE... (2 Replies)
Discussion started by: Raysf
2 Replies

10. Shell Programming and Scripting

Read/write perl file

Hi I am trying to build a web form where it can take the input from the user and write it to a file. And when I will open that form again that for should read the file that was created at the 1st step and all the fields should auto populate from that file. I have 20 text fields in my form. I... (1 Reply)
Discussion started by: sauravrout
1 Replies
MSSQL_EXECUTE(3)														  MSSQL_EXECUTE(3)

mssql_execute - Executes a stored procedure on a MS SQL server database

SYNOPSIS
mixed mssql_execute (resource $stmt, [bool $skip_results = false]) DESCRIPTION
Executes a stored procedure on a MS SQL server database PARAMETERS
o $stmt - Statement handle obtained with mssql_init(3). o $skip_results - Whenever to skip the results or not. EXAMPLES
Example #1 mssql_execute(3) example <?php // Create a new statement $stmt = mssql_init('NewBlogEntry'); // Some data strings $title = 'Test of blogging system'; $content = 'If you can read this, then the new system is compatible with MSSQL'; // Bind values mssql_bind($stmt, '@author', 'Felipe Pena', SQLVARCHAR, false, false, 60); mssql_bind($stmt, '@date', '08/10/2008', SQLVARCHAR, false, false, 20); mssql_bind($stmt, '@title', $title, SQLVARCHAR, false, false, 60); mssql_bind($stmt, '@content', $content, SQLTEXT); // Execute the statement mssql_execute($stmt); // And we can free it like so: mssql_free_statement($stmt); ?> NOTES
Note If the stored procedure returns parameters or a return value these will be available after the call to mssql_execute(3) unless the stored procedure returns more than one result set. In that case use mssql_next_result(3) to shift through the results. When the last result has been processed the output parameters and return values will be available. SEE ALSO
mssql_bind(3), mssql_free_statement(3), mssql_init(3). PHP Documentation Group MSSQL_EXECUTE(3)
All times are GMT -4. The time now is 11:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy