CFD Online Logo CFD Online URL
Home > Forums > General Forums > Main CFD Forum

perl script error (looping)

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   September 11, 2009, 12:47
Default perl script error (looping)
New Member
al mazdeh
Join Date: Mar 2009
Posts: 16
Rep Power: 17
amazdeh is on a distinguished road
Can anyone show me how to loop through files in perl? Or cfx
I know how to use loops-but I like to apply it on files with names in numeric orders foe exampleslike


I wrote a script file- that gives me one error when it tries to rewrite the file after each loop- i have highlighed it below

CFX Pre Version = 11.0

!$num_files = 2;
! for ($i=0; $i < $num_files; $i++) {
! $n = $i + 1;
! $filename = "PLATEJET_InCompress_" . $n . ".def";
>load filename=$filename , mode=def, recoverSession=no, replaceFlow=yes, overwrite=yes > update
>importccl filename=change.ccl, mode = append, autoLoadLibrary = none

>writeCaseFile filename = "PLATEJET_InCompress_" . $n . ".def", operation=write \
solver file
> update

>close, deleteLibrary = On
> update
amazdeh is offline   Reply With Quote


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Perl script for intialisation pratik mehta CFX 2 September 10, 2008 03:09
Is Perl installed with CFX? Rikio CFX 4 May 28, 2008 03:33
Solver Control via .pre file with Perl script ahlo CFX 1 March 7, 2008 12:33
Time-steps via Perl in CCL Rui CFX 5 March 29, 2004 00:47
linking the script Mavinakere FLUENT 0 September 12, 2002 11:57

All times are GMT -4. The time now is 10:21.